[#740] Fix WebSocketClientHandshaker00.finishHandshake() validations
This commit is contained in:
parent
46d713970b
commit
d28eca7138
@ -228,15 +228,15 @@ public class WebSocketClientHandshaker00 extends WebSocketClientHandshaker {
|
||||
}
|
||||
|
||||
String upgrade = response.getHeader(Names.UPGRADE);
|
||||
if (Values.WEBSOCKET.equalsIgnoreCase(upgrade)) {
|
||||
if (!Values.WEBSOCKET.equalsIgnoreCase(upgrade)) {
|
||||
throw new WebSocketHandshakeException("Invalid handshake response upgrade: "
|
||||
+ response.getHeader(Names.UPGRADE));
|
||||
+ upgrade);
|
||||
}
|
||||
|
||||
String connection = response.getHeader(Names.CONNECTION);
|
||||
if (Values.UPGRADE.equalsIgnoreCase(connection)) {
|
||||
if (!Values.UPGRADE.equalsIgnoreCase(connection)) {
|
||||
throw new WebSocketHandshakeException("Invalid handshake response connection: "
|
||||
+ response.getHeader(Names.CONNECTION));
|
||||
+ connection);
|
||||
}
|
||||
|
||||
byte[] challenge = response.getContent().array();
|
||||
|
Loading…
Reference in New Issue
Block a user