Skip to content

Commit

Permalink
Replace hardcoded "Sec-WebSocket-Version" with constant
Browse files Browse the repository at this point in the history
Closes gh-34319

Signed-off-by: Daeho Kwon <[email protected]>
  • Loading branch information
kwondh5217 authored and rstoyanchev committed Feb 3, 2025
1 parent 1b18928 commit 7536777
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ protected String[] getSupportedVersions() {

protected void handleWebSocketVersionNotSupported(ServerHttpRequest request, ServerHttpResponse response) {
if (logger.isErrorEnabled()) {
String version = request.getHeaders().getFirst("Sec-WebSocket-Version");
String version = request.getHeaders().getFirst(WebSocketHttpHeaders.SEC_WEBSOCKET_VERSION);
logger.error(LogFormatUtils.formatValue(
"Handshake failed due to unsupported WebSocket version: " + version +
". Supported versions: " + Arrays.toString(getSupportedVersions()), -1, true));
Expand Down

0 comments on commit 7536777

Please sign in to comment.