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:
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.
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:
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.