Skip to content

Commit fbf4724

Browse files
committed
Replace Jetty 9 only constant with explicit value
Closes gh-27121
1 parent 3944214 commit fbf4724

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

spring-websocket/src/main/java/org/springframework/web/socket/server/jetty/Jetty10RequestUpgradeStrategy.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
import org.aopalliance.intercept.MethodInterceptor;
3131
import org.aopalliance.intercept.MethodInvocation;
32-
import org.eclipse.jetty.websocket.server.HandshakeRFC6455;
3332

3433
import org.springframework.aop.framework.ProxyFactory;
3534
import org.springframework.aop.target.EmptyTargetSource;
@@ -56,7 +55,7 @@
5655
*/
5756
public class Jetty10RequestUpgradeStrategy implements RequestUpgradeStrategy {
5857

59-
private static final String[] SUPPORTED_VERSIONS = new String[] { String.valueOf(HandshakeRFC6455.VERSION) };
58+
private static final String[] SUPPORTED_VERSIONS = new String[] { String.valueOf(13) };
6059

6160
private static final Class<?> webSocketCreatorClass;
6261

spring-websocket/src/main/java/org/springframework/web/socket/server/jetty/JettyRequestUpgradeStrategy.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,7 +31,6 @@
3131

3232
import org.eclipse.jetty.websocket.api.WebSocketPolicy;
3333
import org.eclipse.jetty.websocket.api.extensions.ExtensionConfig;
34-
import org.eclipse.jetty.websocket.server.HandshakeRFC6455;
3534
import org.eclipse.jetty.websocket.server.WebSocketServerFactory;
3635

3736
import org.springframework.context.Lifecycle;
@@ -168,7 +167,7 @@ public boolean isRunning() {
168167

169168
@Override
170169
public String[] getSupportedVersions() {
171-
return new String[] { String.valueOf(HandshakeRFC6455.VERSION) };
170+
return new String[] { String.valueOf(13) };
172171
}
173172

174173
@Override

0 commit comments

Comments
 (0)