[#795] Fix WebSocketClientHandshaker13 and WebSocketClientHandshaker08 finishHandshake() method.

This commit is contained in:
Norman Maurer 2012-12-07 20:14:11 +01:00
parent e5a8958ed6
commit 312810d415
2 changed files with 4 additions and 4 deletions

View File

@ -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));
}

View File

@ -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));
}