zwopple / PocketSocket

Objective-C websocket library for building things that work in realtime on iOS and OS X.
Other
414 stars 129 forks source link

fixed broken parsing of Websocket Extensions if server side is a Tomcat 8.0 instance #25

Closed irockel closed 8 years ago

irockel commented 9 years ago

While parsing the Sec-WebSocket-Extensions PocketSocket assumes the Extensions are separated with a ";" followed with a blank, this is not the case for tomcat and is as far as I can see no requirement. In my case this lead to a wrongly configured "permessage-deflate", as the server assumed the client wants permessage-deflate but the client failed parsing the server response send by Tomcat 8.0:

Sec-WebSocket-Extensions : permessage-deflate;client_max_window_bits=15

and assumes the server doesn't support permessage-deflate and fails parsing data send from the server. The change fixes this by removing the blank and trimming the extension string before comparing.

robertjpayne commented 8 years ago

@irockel I believe this should now be resolved in develop, sorry for the long delay