From 3a327373fec0e9ff3df7cfd54ab0a95b7081d604 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 8 Jul 2015 12:02:59 +0530 Subject: [PATCH] changes related to websocket-extenstion which is changed to permessage-deflate to support tomcat version 8.0.23 --- .../src/com/koushikdutta/async/http/WebSocketImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AndroidAsync/src/com/koushikdutta/async/http/WebSocketImpl.java b/AndroidAsync/src/com/koushikdutta/async/http/WebSocketImpl.java index 6bbd2e59c..5bd3c79b8 100644 --- a/AndroidAsync/src/com/koushikdutta/async/http/WebSocketImpl.java +++ b/AndroidAsync/src/com/koushikdutta/async/http/WebSocketImpl.java @@ -146,7 +146,7 @@ public static void addWebSocketUpgradeHeaders(AsyncHttpRequest req, String proto final String key = Base64.encodeToString(toByteArray(UUID.randomUUID()),Base64.NO_WRAP); headers.set("Sec-WebSocket-Version", "13"); headers.set("Sec-WebSocket-Key", key); - headers.set("Sec-WebSocket-Extensions", "x-webkit-deflate-frame"); + headers.set("Sec-WebSocket-Extensions", "permessage-deflate"); headers.set("Connection", "Upgrade"); headers.set("Upgrade", "websocket"); if (protocol != null) @@ -183,7 +183,7 @@ public static WebSocket finishHandshake(Headers requestHeaders, AsyncHttpRespons String extensions = requestHeaders.get("Sec-WebSocket-Extensions"); boolean deflate = false; if (extensions != null) { - if (extensions.equals("x-webkit-deflate-frame")) + if (extensions.equals("permessage-deflate")) deflate = true; // is this right? do we want to crap out here? Commenting out // as I suspect this caused a regression.