Fixed wrong content length for websocket handshake messages
This commit is contained in:
parent
e0545ba583
commit
7df28adfe3
@ -631,14 +631,14 @@ public class HttpHeaders {
|
||||
if (HttpMethod.GET.equals(req.getMethod()) &&
|
||||
req.containsHeader(Names.SEC_WEBSOCKET_KEY1) &&
|
||||
req.containsHeader(Names.SEC_WEBSOCKET_KEY2)) {
|
||||
return 10;
|
||||
return 8;
|
||||
}
|
||||
} else 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 18;
|
||||
return 16;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user