verify() — netty Function Reference
Architecture documentation for the verify() function in WebSocketClientHandshaker08.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 45bd1cf1_8955_21e9_1d6e_9914f74ea541["verify()"] daf2be11_c8e3_bc40_9146_8afca521ae80["WebSocketClientHandshaker08"] 45bd1cf1_8955_21e9_1d6e_9914f74ea541 -->|defined in| daf2be11_c8e3_bc40_9146_8afca521ae80 style 45bd1cf1_8955_21e9_1d6e_9914f74ea541 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker08.java lines 307–330
@Override
protected void verify(FullHttpResponse response) {
HttpResponseStatus status = response.status();
if (!HttpResponseStatus.SWITCHING_PROTOCOLS.equals(status)) {
throw new WebSocketClientHandshakeException("Invalid handshake response getStatus: " + status, response);
}
HttpHeaders headers = response.headers();
CharSequence upgrade = headers.get(HttpHeaderNames.UPGRADE);
if (!HttpHeaderValues.WEBSOCKET.contentEqualsIgnoreCase(upgrade)) {
throw new WebSocketClientHandshakeException("Invalid handshake response upgrade: " + upgrade, response);
}
if (!headers.containsValue(HttpHeaderNames.CONNECTION, HttpHeaderValues.UPGRADE, true)) {
throw new WebSocketClientHandshakeException("Invalid handshake response connection: "
+ headers.get(HttpHeaderNames.CONNECTION), response);
}
CharSequence accept = headers.get(HttpHeaderNames.SEC_WEBSOCKET_ACCEPT);
if (accept == null || !accept.equals(expectedChallengeResponseString)) {
throw new WebSocketClientHandshakeException(String.format(
"Invalid challenge. Actual: %s. Expected: %s", accept, expectedChallengeResponseString), response);
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does verify() do?
verify() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker08.java.
Where is verify() defined?
verify() is defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker08.java at line 307.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free