ASF Bugzilla – Attachment 35887 Details for
Bug 62312
Add Proxy Authentication support to websocket client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Change for proxy authentication with updated scheme selection algorithm
Websocket-proxy-authentication-2.patch (text/plain), 26.74 KB, created by
Joe Mokos
on 2018-04-20 18:26:44 UTC
(
hide
)
Description:
Change for proxy authentication with updated scheme selection algorithm
Filename:
MIME Type:
Creator:
Joe Mokos
Created:
2018-04-20 18:26:44 UTC
Size:
26.74 KB
patch
obsolete
>From 4d2a8163930f0f40af261f20716b2288854014b8 Mon Sep 17 00:00:00 2001 >From: Joe Mokos <jmokos@riverbed.com> >Date: Tue, 17 Apr 2018 12:26:34 -0400 >Subject: [PATCH 1/2] Add proxy authentication support to websocket client > >--- > .../tomcat/websocket/AuthenticatorFactory.java | 16 ++++++- > .../tomcat/websocket/BasicAuthenticator.java | 7 +++ > java/org/apache/tomcat/websocket/Constants.java | 4 ++ > .../tomcat/websocket/DigestAuthenticator.java | 14 ++++-- > .../tomcat/websocket/ProxyBasicAuthenticator.java | 24 ++++++++++ > .../tomcat/websocket/ProxyDigestAuthenticator.java | 27 +++++++++++ > .../tomcat/websocket/WsWebSocketContainer.java | 56 ++++++++++++++++++++-- > 7 files changed, 138 insertions(+), 10 deletions(-) > create mode 100644 java/org/apache/tomcat/websocket/ProxyBasicAuthenticator.java > create mode 100644 java/org/apache/tomcat/websocket/ProxyDigestAuthenticator.java > >diff --git a/java/org/apache/tomcat/websocket/AuthenticatorFactory.java b/java/org/apache/tomcat/websocket/AuthenticatorFactory.java >index 0d28da4..1f784cc 100644 >--- a/java/org/apache/tomcat/websocket/AuthenticatorFactory.java >+++ b/java/org/apache/tomcat/websocket/AuthenticatorFactory.java >@@ -24,6 +24,8 @@ import java.util.ServiceLoader; > * the scheme that the server uses. > */ > public class AuthenticatorFactory { >+ >+ public enum Type {WWW, PROXY} > > /** > * Return a new authenticator instance. >@@ -32,15 +34,25 @@ public class AuthenticatorFactory { > */ > public static Authenticator getAuthenticator(String authScheme) { > >+ return getAuthenticator(Type.WWW, authScheme); >+ } >+ >+ /** >+ * Return a new authenticator instance. >+ * @param authScheme The scheme used >+ * @return the authenticator >+ */ >+ public static Authenticator getAuthenticator(Type type, String authScheme) { >+ > Authenticator auth = null; > switch (authScheme.toLowerCase()) { > > case BasicAuthenticator.schemeName: >- auth = new BasicAuthenticator(); >+ auth = (type == Type.PROXY) ? new ProxyBasicAuthenticator() : new BasicAuthenticator(); > break; > > case DigestAuthenticator.schemeName: >- auth = new DigestAuthenticator(); >+ auth = (type == Type.PROXY) ? new ProxyDigestAuthenticator() : new DigestAuthenticator(); > break; > > default: >diff --git a/java/org/apache/tomcat/websocket/BasicAuthenticator.java b/java/org/apache/tomcat/websocket/BasicAuthenticator.java >index 49c58b0..3cd35d7 100644 >--- a/java/org/apache/tomcat/websocket/BasicAuthenticator.java >+++ b/java/org/apache/tomcat/websocket/BasicAuthenticator.java >@@ -35,6 +35,13 @@ public class BasicAuthenticator extends Authenticator { > > String userName = (String) userProperties.get(Constants.WS_AUTHENTICATION_USER_NAME); > String password = (String) userProperties.get(Constants.WS_AUTHENTICATION_PASSWORD); >+ >+ return getAuthorization(userName, password, requestUri, WWWAuthenticate, userProperties); >+ } >+ >+// @Override >+ protected String getAuthorization(String userName, String password, String requestUri, String WWWAuthenticate, >+ Map<String, Object> userProperties) throws AuthenticationException { > > if (userName == null || password == null) { > throw new AuthenticationException( >diff --git a/java/org/apache/tomcat/websocket/Constants.java b/java/org/apache/tomcat/websocket/Constants.java >index eeee8cc..bed92f9 100644 >--- a/java/org/apache/tomcat/websocket/Constants.java >+++ b/java/org/apache/tomcat/websocket/Constants.java >@@ -88,6 +88,8 @@ public class Constants { > public static final String CONNECTION_HEADER_NAME = "Connection"; > public static final String CONNECTION_HEADER_VALUE = "upgrade"; > public static final String LOCATION_HEADER_NAME = "Location"; >+ public static final String PROXY_AUTHORIZATION_HEADER_NAME = "Proxy-Authorization"; >+ public static final String PROXY_AUTHENTICATE_HEADER_NAME = "Proxy-Authenticate"; > public static final String AUTHORIZATION_HEADER_NAME = "Authorization"; > public static final String WWW_AUTHENTICATE_HEADER_NAME = "WWW-Authenticate"; > public static final String WS_VERSION_HEADER_NAME = "Sec-WebSocket-Version"; >@@ -121,6 +123,8 @@ public class Constants { > > public static final String WS_AUTHENTICATION_USER_NAME = "org.apache.tomcat.websocket.WS_AUTHENTICATION_USER_NAME"; > public static final String WS_AUTHENTICATION_PASSWORD = "org.apache.tomcat.websocket.WS_AUTHENTICATION_PASSWORD"; >+ public static final String WS_PROXY_AUTHENTICATION_USER_NAME = "org.apache.tomcat.websocket.WS_PROXY_AUTHENTICATION_USER_NAME"; >+ public static final String WS_PROXY_AUTHENTICATION_PASSWORD = "org.apache.tomcat.websocket.WS_PROXY_AUTHENTICATION_PASSWORD"; > > /* Configuration for extensions > * Note: These options are primarily present to enable this implementation >diff --git a/java/org/apache/tomcat/websocket/DigestAuthenticator.java b/java/org/apache/tomcat/websocket/DigestAuthenticator.java >index 021489f..d0fc3f1 100644 >--- a/java/org/apache/tomcat/websocket/DigestAuthenticator.java >+++ b/java/org/apache/tomcat/websocket/DigestAuthenticator.java >@@ -41,6 +41,12 @@ public class DigestAuthenticator extends Authenticator { > String userName = (String) userProperties.get(Constants.WS_AUTHENTICATION_USER_NAME); > String password = (String) userProperties.get(Constants.WS_AUTHENTICATION_PASSWORD); > >+ return getAuthorization(userName, password, "GET", requestUri, WWWAuthenticate, userProperties); >+ } >+ >+ protected String getAuthorization(String userName, String password, String method, >+ String requestUri, String WWWAuthenticate, Map<String, Object> userProperties) throws AuthenticationException { >+ > if (userName == null || password == null) { > throw new AuthenticationException( > "Failed to perform Digest authentication due to missing user/password"); >@@ -73,7 +79,7 @@ public class DigestAuthenticator extends Authenticator { > challenge.append("uri=\"" + requestUri + "\","); > > try { >- challenge.append("response=\"" + calculateRequestDigest(requestUri, userName, password, >+ challenge.append("response=\"" + calculateRequestDigest(method, requestUri, userName, password, > realm, nonce, messageQop, algorithm) + "\","); > } > >@@ -94,8 +100,8 @@ public class DigestAuthenticator extends Authenticator { > return challenge.toString(); > > } >- >- private String calculateRequestDigest(String requestUri, String userName, String password, >+ >+ private String calculateRequestDigest(String method, String requestUri, String userName, String password, > String realm, String nonce, String qop, String algorithm) > throws NoSuchAlgorithmException { > >@@ -113,7 +119,7 @@ public class DigestAuthenticator extends Authenticator { > * digest-uri-value ":" H(entity-body) since we do not have an entity-body, A2 = > * Method ":" digest-uri-value for auth and auth_int > */ >- String A2 = "GET:" + requestUri; >+ String A2 = method + ":" + requestUri; > > preDigest.append(encodeMD5(A1)); > preDigest.append(":"); >diff --git a/java/org/apache/tomcat/websocket/ProxyBasicAuthenticator.java b/java/org/apache/tomcat/websocket/ProxyBasicAuthenticator.java >new file mode 100644 >index 0000000..11ac172 >--- /dev/null >+++ b/java/org/apache/tomcat/websocket/ProxyBasicAuthenticator.java >@@ -0,0 +1,24 @@ >+/** >+ * >+ */ >+package org.apache.tomcat.websocket; >+ >+import java.util.Map; >+ >+/** >+ * @author jmokos >+ * >+ */ >+public class ProxyBasicAuthenticator extends BasicAuthenticator { >+ >+ @Override >+ public String getAuthorization(String requestUri, String WWWAuthenticate, >+ Map<String, Object> userProperties) throws AuthenticationException { >+ >+ String userName = (String) userProperties.get(Constants.WS_PROXY_AUTHENTICATION_USER_NAME); >+ String password = (String) userProperties.get(Constants.WS_PROXY_AUTHENTICATION_PASSWORD); >+ >+ return getAuthorization(userName, password, requestUri, WWWAuthenticate, userProperties); >+ } >+ >+} >diff --git a/java/org/apache/tomcat/websocket/ProxyDigestAuthenticator.java b/java/org/apache/tomcat/websocket/ProxyDigestAuthenticator.java >new file mode 100644 >index 0000000..09c6a8c >--- /dev/null >+++ b/java/org/apache/tomcat/websocket/ProxyDigestAuthenticator.java >@@ -0,0 +1,27 @@ >+/** >+ * >+ */ >+package org.apache.tomcat.websocket; >+ >+import java.util.Map; >+ >+/** >+ * @author jmokos >+ * >+ */ >+public class ProxyDigestAuthenticator extends DigestAuthenticator { >+ >+ /* (non-Javadoc) >+ * @see org.apache.tomcat.websocket.Authenticator#getAuthorization(java.lang.String, java.lang.String, java.util.Map) >+ */ >+ @Override >+ public String getAuthorization(String requestUri, String WWWAuthenticate, Map<String, Object> userProperties) >+ throws AuthenticationException { >+ >+ String userName = (String) userProperties.get(Constants.WS_PROXY_AUTHENTICATION_USER_NAME); >+ String password = (String) userProperties.get(Constants.WS_PROXY_AUTHENTICATION_PASSWORD); >+ >+ return getAuthorization(userName, password, "CONNECT", requestUri, WWWAuthenticate, userProperties); >+ } >+ >+} >diff --git a/java/org/apache/tomcat/websocket/WsWebSocketContainer.java b/java/org/apache/tomcat/websocket/WsWebSocketContainer.java >index ce61c35..6048326 100644 >--- a/java/org/apache/tomcat/websocket/WsWebSocketContainer.java >+++ b/java/org/apache/tomcat/websocket/WsWebSocketContainer.java >@@ -258,7 +258,7 @@ public class WsWebSocketContainer implements WebSocketContainer, BackgroundProce > if (sa == null) { > sa = new InetSocketAddress(host, port); > } else { >- proxyConnect = createProxyRequest(host, port); >+ proxyConnect = createProxyRequest(host, port, clientEndpointConfiguration); > } > > // Create the initial HTTP request to open the WebSocket connection >@@ -309,13 +309,51 @@ public class WsWebSocketContainer implements WebSocketContainer, BackgroundProce > channel = new AsyncChannelWrapperNonSecure(socketChannel); > writeRequest(channel, proxyConnect, timeout); > HttpResponse httpResponse = processResponse(response, channel, timeout); >- if (httpResponse.getStatus() != 200) { >+ >+ if (httpResponse.getStatus() == 407) { >+ >+ if (userProperties.get(Constants.PROXY_AUTHORIZATION_HEADER_NAME) != null) { >+ throw new DeploymentException(sm.getString( >+ "wsWebSocketContainer.failedProxyAuthentication", >+ Integer.valueOf(httpResponse.status))); >+ } >+ >+ List<String> proxyAuthenticateHeaders = httpResponse.getHandshakeResponse() >+ .getHeaders().get(Constants.PROXY_AUTHENTICATE_HEADER_NAME); >+ >+ String firstAuthenticateHeader; >+ if (proxyAuthenticateHeaders == null || proxyAuthenticateHeaders.isEmpty() || >+ (firstAuthenticateHeader = proxyAuthenticateHeaders.get(0)) == null || >+ firstAuthenticateHeader.isEmpty()) { >+ throw new DeploymentException(sm.getString( >+ "wsWebSocketContainer.missingProxyAuthenticateHeader", >+ Integer.toString(httpResponse.status))); >+ } >+ >+ String authScheme = firstAuthenticateHeader.split("\\s+", 2)[0]; >+ String requestUri = new String(proxyConnect.array(), StandardCharsets.ISO_8859_1) >+ .split("\\s", 3)[1]; >+ >+ Authenticator auth = AuthenticatorFactory.getAuthenticator(AuthenticatorFactory.Type.PROXY, authScheme); >+ >+ if (auth == null) { >+ throw new DeploymentException( >+ sm.getString("wsWebSocketContainer.unsupportedProxyAuthScheme", >+ Integer.valueOf(httpResponse.status), authScheme)); >+ } >+ >+ userProperties.put(Constants.PROXY_AUTHORIZATION_HEADER_NAME, auth.getAuthorization( >+ requestUri, firstAuthenticateHeader, userProperties)); >+ >+ return connectToServerRecursive(endpoint, clientEndpointConfiguration, path, redirectSet); >+ } >+ else if (httpResponse.getStatus() != 200) { > throw new DeploymentException(sm.getString( > "wsWebSocketContainer.proxyConnectFail", selectedProxy, > Integer.toString(httpResponse.getStatus()))); > } > } catch (TimeoutException | InterruptedException | ExecutionException | >- EOFException e) { >+ EOFException | AuthenticationException e) { > if (channel != null) { > channel.close(); > } >@@ -559,7 +597,8 @@ public class WsWebSocketContainer implements WebSocketContainer, BackgroundProce > } > > >- private static ByteBuffer createProxyRequest(String host, int port) { >+ private static ByteBuffer createProxyRequest(String host, int port, >+ ClientEndpointConfig clientEndpointConfiguration) { > StringBuilder request = new StringBuilder(); > request.append("CONNECT "); > request.append(host); >@@ -571,6 +610,15 @@ public class WsWebSocketContainer implements WebSocketContainer, BackgroundProce > request.append(':'); > request.append(port); > >+ Map<String, Object> userProperties = clientEndpointConfiguration.getUserProperties(); >+ String proxyAuthString = (String) userProperties.get(Constants.PROXY_AUTHORIZATION_HEADER_NAME); >+ if (proxyAuthString != null) { >+ request.append("\r\n"); >+ request.append(Constants.PROXY_AUTHORIZATION_HEADER_NAME); >+ request.append(":"); >+ request.append(proxyAuthString); >+ } >+ > request.append("\r\n\r\n"); > > byte[] bytes = request.toString().getBytes(StandardCharsets.ISO_8859_1); >-- >2.9.2.windows.1 > > >From 9aca37c8182655766a51fad521952b682b51818c Mon Sep 17 00:00:00 2001 >From: Joe Mokos <jmokos@riverbed.com> >Date: Fri, 20 Apr 2018 14:03:02 -0400 >Subject: [PATCH 2/2] Changed auth selection algorithm to use first supported > scheme encountered rather than always choosing first scheme. Added tokens to > getString first argument. > >--- > .../tomcat/websocket/WsWebSocketContainer.java | 94 +++++++++++++--------- > 1 file changed, 56 insertions(+), 38 deletions(-) > >diff --git a/java/org/apache/tomcat/websocket/WsWebSocketContainer.java b/java/org/apache/tomcat/websocket/WsWebSocketContainer.java >index 6048326..90db54f 100644 >--- a/java/org/apache/tomcat/websocket/WsWebSocketContainer.java >+++ b/java/org/apache/tomcat/websocket/WsWebSocketContainer.java >@@ -118,7 +118,7 @@ public class WsWebSocketContainer implements WebSocketContainer, BackgroundProce > pojo.getClass().getAnnotation(ClientEndpoint.class); > if (annotation == null) { > throw new DeploymentException( >- sm.getString("wsWebSocketContainer.missingAnnotation", >+ sm.getString("wsWebSocketContainer.missingAnnotation {0}", > pojo.getClass().getName())); > } > >@@ -161,7 +161,7 @@ public class WsWebSocketContainer implements WebSocketContainer, BackgroundProce > pojo = annotatedEndpointClass.getConstructor().newInstance(); > } catch (ReflectiveOperationException e) { > throw new DeploymentException(sm.getString( >- "wsWebSocketContainer.endpointCreateFail", >+ "wsWebSocketContainer.endpointCreateFail {0}", > annotatedEndpointClass.getName()), e); > } > >@@ -179,7 +179,7 @@ public class WsWebSocketContainer implements WebSocketContainer, BackgroundProce > endpoint = clazz.getConstructor().newInstance(); > } catch (ReflectiveOperationException e) { > throw new DeploymentException(sm.getString( >- "wsWebSocketContainer.endpointCreateFail", clazz.getName()), >+ "wsWebSocketContainer.endpointCreateFail {0}", clazz.getName()), > e); > } > >@@ -212,7 +212,7 @@ public class WsWebSocketContainer implements WebSocketContainer, BackgroundProce > secure = true; > } else { > throw new DeploymentException(sm.getString( >- "wsWebSocketContainer.pathWrongScheme", scheme)); >+ "wsWebSocketContainer.pathWrongScheme {0}", scheme)); > } > > // Validate host >@@ -314,42 +314,50 @@ public class WsWebSocketContainer implements WebSocketContainer, BackgroundProce > > if (userProperties.get(Constants.PROXY_AUTHORIZATION_HEADER_NAME) != null) { > throw new DeploymentException(sm.getString( >- "wsWebSocketContainer.failedProxyAuthentication", >+ "wsWebSocketContainer.failedProxyAuthentication {0}", > Integer.valueOf(httpResponse.status))); > } > > List<String> proxyAuthenticateHeaders = httpResponse.getHandshakeResponse() > .getHeaders().get(Constants.PROXY_AUTHENTICATE_HEADER_NAME); > >- String firstAuthenticateHeader; >- if (proxyAuthenticateHeaders == null || proxyAuthenticateHeaders.isEmpty() || >- (firstAuthenticateHeader = proxyAuthenticateHeaders.get(0)) == null || >- firstAuthenticateHeader.isEmpty()) { >- throw new DeploymentException(sm.getString( >- "wsWebSocketContainer.missingProxyAuthenticateHeader", >+ if (proxyAuthenticateHeaders == null || proxyAuthenticateHeaders.isEmpty()) { >+ throw new DeploymentException(sm.getString( >+ "wsWebSocketContainer.missingProxyAuthenticateHeader {0}", > Integer.toString(httpResponse.status))); > } > >- String authScheme = firstAuthenticateHeader.split("\\s+", 2)[0]; >- String requestUri = new String(proxyConnect.array(), StandardCharsets.ISO_8859_1) >- .split("\\s", 3)[1]; >- >- Authenticator auth = AuthenticatorFactory.getAuthenticator(AuthenticatorFactory.Type.PROXY, authScheme); >+ String authenticateHeader = null; >+ String authScheme = null; >+ Authenticator auth = null; >+ >+ for (String ah : proxyAuthenticateHeaders) { >+ if (ah != null) { >+ authScheme = ah.trim().split("\\s+", 2)[0]; >+ auth = AuthenticatorFactory.getAuthenticator(AuthenticatorFactory.Type.PROXY, authScheme); >+ if (auth != null) { >+ authenticateHeader = ah; >+ break; >+ } >+ } >+ } > > if (auth == null) { > throw new DeploymentException( >- sm.getString("wsWebSocketContainer.unsupportedProxyAuthScheme", >- Integer.valueOf(httpResponse.status), authScheme)); >+ sm.getString("wsWebSocketContainer.noSupportedProxyAuthScheme")); > } > >+ String requestUri = new String(proxyConnect.array(), StandardCharsets.ISO_8859_1) >+ .split("\\s", 3)[1]; >+ > userProperties.put(Constants.PROXY_AUTHORIZATION_HEADER_NAME, auth.getAuthorization( >- requestUri, firstAuthenticateHeader, userProperties)); >+ requestUri, authenticateHeader, userProperties)); > > return connectToServerRecursive(endpoint, clientEndpointConfiguration, path, redirectSet); > } > else if (httpResponse.getStatus() != 200) { > throw new DeploymentException(sm.getString( >- "wsWebSocketContainer.proxyConnectFail", selectedProxy, >+ "wsWebSocketContainer.proxyConnectFail {0} {1}", selectedProxy, > Integer.toString(httpResponse.getStatus()))); > } > } catch (TimeoutException | InterruptedException | ExecutionException | >@@ -401,7 +409,7 @@ public class WsWebSocketContainer implements WebSocketContainer, BackgroundProce > if (locationHeader == null || locationHeader.isEmpty() || > locationHeader.get(0) == null || locationHeader.get(0).isEmpty()) { > throw new DeploymentException(sm.getString( >- "wsWebSocketContainer.missingLocationHeader", >+ "wsWebSocketContainer.missingLocationHeader {0}", > Integer.toString(httpResponse.status))); > } > >@@ -422,7 +430,7 @@ public class WsWebSocketContainer implements WebSocketContainer, BackgroundProce > > if (!redirectSet.add(redirectLocation) || redirectSet.size() > maxRedirects) { > throw new DeploymentException(sm.getString( >- "wsWebSocketContainer.redirectThreshold", redirectLocation, >+ "wsWebSocketContainer.redirectThreshold {0} {1} {2}", redirectLocation, > Integer.toString(redirectSet.size()), > Integer.toString(maxRedirects))); > } >@@ -435,41 +443,51 @@ public class WsWebSocketContainer implements WebSocketContainer, BackgroundProce > > if (userProperties.get(Constants.AUTHORIZATION_HEADER_NAME) != null) { > throw new DeploymentException(sm.getString( >- "wsWebSocketContainer.failedAuthentication", >+ "wsWebSocketContainer.failedAuthentication {0}", > Integer.valueOf(httpResponse.status))); > } > > List<String> wwwAuthenticateHeaders = httpResponse.getHandshakeResponse() > .getHeaders().get(Constants.WWW_AUTHENTICATE_HEADER_NAME); > >- if (wwwAuthenticateHeaders == null || wwwAuthenticateHeaders.isEmpty() || >- wwwAuthenticateHeaders.get(0) == null || wwwAuthenticateHeaders.get(0).isEmpty()) { >+ if (wwwAuthenticateHeaders == null || wwwAuthenticateHeaders.isEmpty()) { > throw new DeploymentException(sm.getString( >- "wsWebSocketContainer.missingWWWAuthenticateHeader", >+ "wsWebSocketContainer.missingWWWAuthenticateHeader {0}", > Integer.toString(httpResponse.status))); > } > >- String authScheme = wwwAuthenticateHeaders.get(0).split("\\s+", 2)[0]; >- String requestUri = new String(request.array(), StandardCharsets.ISO_8859_1) >- .split("\\s", 3)[1]; >- >- Authenticator auth = AuthenticatorFactory.getAuthenticator(authScheme); >+ String authenticateHeader = null; >+ String authScheme = null; >+ Authenticator auth = null; >+ >+ for (String ah : wwwAuthenticateHeaders) { >+ if (ah != null) { >+ authScheme = ah.trim().split("\\s+", 2)[0]; >+ auth = AuthenticatorFactory.getAuthenticator(AuthenticatorFactory.Type.WWW, authScheme); >+ if (auth != null) { >+ authenticateHeader = ah; >+ break; >+ } >+ } >+ } > > if (auth == null) { > throw new DeploymentException( >- sm.getString("wsWebSocketContainer.unsupportedAuthScheme", >- Integer.valueOf(httpResponse.status), authScheme)); >+ sm.getString("wsWebSocketContainer.noSupportedWWWAuthScheme")); > } > >+ String requestUri = new String(request.array(), StandardCharsets.ISO_8859_1) >+ .split("\\s", 3)[1]; >+ > userProperties.put(Constants.AUTHORIZATION_HEADER_NAME, auth.getAuthorization( >- requestUri, wwwAuthenticateHeaders.get(0), userProperties)); >+ requestUri, authenticateHeader, userProperties)); > > return connectToServerRecursive(endpoint, clientEndpointConfiguration, path, redirectSet); > > } > > else { >- throw new DeploymentException(sm.getString("wsWebSocketContainer.invalidStatus", >+ throw new DeploymentException(sm.getString("wsWebSocketContainer.invalidStatus {0}", > Integer.toString(httpResponse.status))); > } > } >@@ -864,13 +882,13 @@ public class WsWebSocketContainer implements WebSocketContainer, BackgroundProce > // CONNECT for proxy may return a 1.0 response > if (parts.length < 2 || !("HTTP/1.0".equals(parts[0]) || "HTTP/1.1".equals(parts[0]))) { > throw new DeploymentException(sm.getString( >- "wsWebSocketContainer.invalidStatus", line)); >+ "wsWebSocketContainer.invalidStatus {0}", line)); > } > try { > return Integer.parseInt(parts[1]); > } catch (NumberFormatException nfe) { > throw new DeploymentException(sm.getString( >- "wsWebSocketContainer.invalidStatus", line)); >+ "wsWebSocketContainer.invalidStatus {0}", line)); > } > } > >@@ -880,7 +898,7 @@ public class WsWebSocketContainer implements WebSocketContainer, BackgroundProce > > int index = line.indexOf(':'); > if (index == -1) { >- log.warn(sm.getString("wsWebSocketContainer.invalidHeader", line)); >+ log.warn(sm.getString("wsWebSocketContainer.invalidHeader {0}", line)); > return; > } > // Header names are case insensitive so always use lower case >-- >2.9.2.windows.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 62312
:
35880
|
35887
|
35984