[#795] Fix WebSocketClientHandshaker13 and WebSocketClientHandshaker08 finishHandshake() method.
This commit is contained in:
parent
e5a8958ed6
commit
312810d415
@ -201,13 +201,13 @@ public class WebSocketClientHandshaker08 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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
@ -200,13 +200,13 @@ public class WebSocketClientHandshaker13 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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user