@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { super.channelInactive(ctx); // if still handshaking this means we not got any response back from the server and so need to notify the client // about it as otherwise the client would never been notified. if (handshaking) { handleException(new WebSocketHandshakeException("Connection closed while handshake in process")); } }
throw new WebSocketHandshakeException("Invalid handshake response getStatus: " + response.status()); throw new WebSocketHandshakeException("Invalid handshake response upgrade: " + upgrade); throw new WebSocketHandshakeException("Invalid handshake response connection: " + headers.get(HttpHeaderNames.CONNECTION)); throw new WebSocketHandshakeException(String.format( "Invalid challenge. Actual: %s. Expected: %s", accept, expectedChallengeResponseString));
throw new WebSocketHandshakeException("Invalid handshake response getStatus: " + response.status()); throw new WebSocketHandshakeException("Invalid handshake response upgrade: " + upgrade); throw new WebSocketHandshakeException("Invalid handshake response connection: " + headers.get(HttpHeaderNames.CONNECTION)); throw new WebSocketHandshakeException(String.format( "Invalid challenge. Actual: %s. Expected: %s", accept, expectedChallengeResponseString));
throw new WebSocketHandshakeException("Invalid handshake response getStatus: " + response.status()); throw new WebSocketHandshakeException("Invalid handshake response upgrade: " + upgrade); throw new WebSocketHandshakeException("Invalid handshake response connection: " + headers.get(HttpHeaderNames.CONNECTION)); throw new WebSocketHandshakeException(String.format( "Invalid challenge. Actual: %s. Expected: %s", accept, expectedChallengeResponseString));
protected void verify(FullHttpResponse response) { if (!response.status().equals(HttpResponseStatus.SWITCHING_PROTOCOLS)) { throw new WebSocketHandshakeException("Invalid handshake response getStatus: " + response.status()); throw new WebSocketHandshakeException("Invalid handshake response upgrade: " + upgrade); throw new WebSocketHandshakeException("Invalid handshake response connection: " + headers.get(HttpHeaderNames.CONNECTION)); throw new WebSocketHandshakeException("Invalid challenge");
throw new WebSocketHandshakeException("not a WebSocket request: missing key");
throw new WebSocketHandshakeException("not a WebSocket request: missing key");
throw new WebSocketHandshakeException("not a WebSocket request: missing key");
throw new WebSocketHandshakeException("not a WebSocket handshake request: missing upgrade");
throw new WebSocketHandshakeException(String.format( "Invalid subprotocol. Actual: %s. Expected one of: %s", receivedProtocol, expectedSubprotocol));
throw new WebSocketHandshakeException("Protocol version " + version + " not supported.");
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { super.channelInactive(ctx); // if still handshaking this means we not got any response back from the server and so need to notify the client // about it as otherwise the client would never been notified. if (handshaking) { handleException(new WebSocketHandshakeException("Connection closed while handshake in process")); } }
throw new WebSocketHandshakeException("Invalid handshake response getStatus: " + response.status()); throw new WebSocketHandshakeException("Invalid handshake response upgrade: " + upgrade); throw new WebSocketHandshakeException("Invalid handshake response connection: " + headers.get(HttpHeaderNames.CONNECTION)); throw new WebSocketHandshakeException(String.format( "Invalid challenge. Actual: %s. Expected: %s", accept, expectedChallengeResponseString));
throw new WebSocketHandshakeException("Invalid handshake response getStatus: " + response.status()); throw new WebSocketHandshakeException("Invalid handshake response upgrade: " + upgrade); throw new WebSocketHandshakeException("Invalid handshake response connection: " + headers.get(HttpHeaderNames.CONNECTION)); throw new WebSocketHandshakeException(String.format( "Invalid challenge. Actual: %s. Expected: %s", accept, expectedChallengeResponseString));
throw new WebSocketHandshakeException("Invalid handshake response getStatus: " + response.status()); throw new WebSocketHandshakeException("Invalid handshake response upgrade: " + upgrade); throw new WebSocketHandshakeException("Invalid handshake response connection: " + headers.get(HttpHeaderNames.CONNECTION)); throw new WebSocketHandshakeException(String.format( "Invalid challenge. Actual: %s. Expected: %s", accept, expectedChallengeResponseString));
throw new WebSocketHandshakeException("Invalid handshake response getStatus: " + response.status()); throw new WebSocketHandshakeException("Invalid handshake response upgrade: " + upgrade); throw new WebSocketHandshakeException("Invalid handshake response connection: " + headers.get(HttpHeaderNames.CONNECTION)); throw new WebSocketHandshakeException(String.format( "Invalid challenge. Actual: %s. Expected: %s", accept, expectedChallengeResponseString));
throw new WebSocketHandshakeException("Invalid handshake response getStatus: " + response.status()); throw new WebSocketHandshakeException("Invalid handshake response upgrade: " + upgrade); throw new WebSocketHandshakeException("Invalid handshake response connection: " + headers.get(HttpHeaderNames.CONNECTION)); throw new WebSocketHandshakeException(String.format( "Invalid challenge. Actual: %s. Expected: %s", accept, expectedChallengeResponseString));
throw new WebSocketHandshakeException("Invalid handshake response getStatus: " + response.status()); throw new WebSocketHandshakeException("Invalid handshake response upgrade: " + upgrade); throw new WebSocketHandshakeException("Invalid handshake response connection: " + headers.get(HttpHeaderNames.CONNECTION)); throw new WebSocketHandshakeException(String.format( "Invalid challenge. Actual: %s. Expected: %s", accept, expectedChallengeResponseString));
protected void verify(FullHttpResponse response) { if (!response.status().equals(HttpResponseStatus.SWITCHING_PROTOCOLS)) { throw new WebSocketHandshakeException("Invalid handshake response getStatus: " + response.status()); throw new WebSocketHandshakeException("Invalid handshake response upgrade: " + upgrade); throw new WebSocketHandshakeException("Invalid handshake response connection: " + headers.get(HttpHeaderNames.CONNECTION)); throw new WebSocketHandshakeException("Invalid challenge");
protected void verify(FullHttpResponse response) { if (!response.status().equals(HttpResponseStatus.SWITCHING_PROTOCOLS)) { throw new WebSocketHandshakeException("Invalid handshake response getStatus: " + response.status()); throw new WebSocketHandshakeException("Invalid handshake response upgrade: " + upgrade); throw new WebSocketHandshakeException("Invalid handshake response connection: " + headers.get(HttpHeaderNames.CONNECTION)); throw new WebSocketHandshakeException("Invalid challenge");