[#4095] Correctly handle Upgrade responses with special handling of Hixie 76
Motivation: Hixie 76 needs special handling compared to other connection upgrade responses. Our detection code of non websocket responses did actually always use the special handling that only should be used for Hixie 76 responses. Modifications: Correctly detect connection upgrade responses which are not for websockets. Result: Be able to upgrade connections for other protocols then websockets.
This commit is contained in:
parent
01ac21c63d
commit
a7d3372b3d
@ -457,7 +457,8 @@ public abstract class HttpObjectDecoder extends ByteToMessageDecoder {
|
||||
// - https://github.com/netty/netty/issues/222
|
||||
if (code >= 100 && code < 200) {
|
||||
// One exception: Hixie 76 websocket handshake response
|
||||
return !(code == 101 && !res.headers().contains(HttpHeaderNames.SEC_WEBSOCKET_ACCEPT));
|
||||
return !(code == 101 && !res.headers().contains(HttpHeaderNames.SEC_WEBSOCKET_ACCEPT)
|
||||
&& res.headers().contains(HttpHeaderNames.UPGRADE, HttpHeaderValues.WEBSOCKET, true));
|
||||
}
|
||||
|
||||
switch (code) {
|
||||
|
Loading…
Reference in New Issue
Block a user