Closed seviu closed 8 years ago
@seviu hrm, I'll hvae to run the autobahn tests against this, the reason the window bits is used is because of how the permessage-deflate protocol works
@seviu I'm not actually sure this is 100% the problem, There's currently a lot of problems with the permessage-deflate extension (newer Autobahn tests have uncovered flawed implementation). At this point I don't really have time or a desire to fix it that much so I may just disable the permessage-deflate extension all together…
@seviu just heads up two things are landing in develop that should resolve this issue for you:
11
as the default window bits rather than 15
.Closing this PR as it's not actually the fix, the issue with PocketSocket was a invalid permessage-deflate implementation that could cause bugs for fragmented websocket frames. This is going to land in develop in the next few hours.
@seviu this is now live on CocoaPods as v 1.0.0
On some instances headers are missing and inflateInit2 fails.
This fix can also be applied on the development branch:
http://stackoverflow.com/questions/18700656/zlib-inflate-failing-with-3-z-data-error
Inflate() was failing because it was looking for GZip headers which were not present. If you initialize the stream with:
ret = inflateInit2(&strm, -MAX_WBITS); Passing a negative window bits value prevents inflate from checking for gzip or zlib headers and unzipping works as expected.