netty/netty — comment on commit 09b41b28ea856fd27a85c203b5dc6015ae91c86e
File: codec-http/src/main/java/io/netty/handler/codec/http/HttpMessageDecoder.java line 374
By trustin:

We also must make sure it's really a WebSocket upgrade response. It's not always a WebSocket response even if the status code is 101. Check this out at `HttpHeaders.java`

if (message instanceof HttpResponse) {
HttpResponse res = (HttpResponse) message;
if (res.getStatus().getCode() == 101 &&
res.containsHeader(Names.SEC_WEBSOCKET_ORIGIN) &&
res.containsHeader(Names.SEC_WEBSOCKET_LOCATION)) {
return 16;
}
}