Skip to content

Commit 775f453

Browse files
committed
Merge pull request AsyncHttpClient#64 from havocp/status-code-on-invalid-upgrade
on bad websocket upgrade, include the bad status code in the exception
2 parents c0f338c + 15f0676 commit 775f453

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/ning/http/client/websocket/WebSocketUpgradeHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public final STATE onStatusReceived(HttpResponseStatus responseStatus) throws Ex
6464
if (responseStatus.getStatusCode() == 101) {
6565
return STATE.UPGRADE;
6666
} else {
67-
throw new IllegalStateException("Invalid Upgrade protocol");
67+
throw new IllegalStateException("Invalid upgrade protocol, status should be 101 but was " + responseStatus.getStatusCode());
6868
}
6969
}
7070

0 commit comments

Comments
 (0)