Author: markt
Date: Fri Jun 6 16:50:24 2014
New Revision: 1600961
URL: http://svn.apache.org/r1600961
Log:
Revert fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=56573
The fix triggered a TCK failure
Removed:
tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsHandshakeRequest.java
tomcat/trunk/test/org/apache/tomcat/websocket/server/TesterUriServer.java
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
tomcat/trunk/webapps/docs/changelog.xml
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties?rev=1600961&r1=1600960&r2=1600961&view=diff
==============================================================================
---
tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties
(original)
+++
tomcat/trunk/java/org/apache/tomcat/websocket/server/LocalStrings.properties
Fri Jun 6 16:50:24 2014
@@ -29,8 +29,6 @@ uriTemplate.emptySegment=The path [{0}]
uriTemplate.invalidPath=The path [{0}] is not valid.
uriTemplate.invalidSegment=The segment [{0}] is not valid in the provided path
[{1}]
-wsHandshakeRequest.unknownScheme=The scheme [{0}] is not recognised. [http] or
[https] is expected
-
wsHttpUpgradeHandler.destroyFailed=Failed to close WebConnection while
destroying the WebSocket HttpUpgradeHandler
wsHttpUpgradeHandler.noPreInit=The preInit() method must be called to
configure the WebSocket HttpUpgradeHandler before the container calls init().
Usually, this means the Servlet that created the WsHttpUpgradeHandler instance
should also call preInit()
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java?rev=1600961&r1=1600960&r2=1600961&view=diff
==============================================================================
---
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
(original)
+++
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
Fri Jun 6 16:50:24 2014
@@ -30,15 +30,11 @@ import java.util.Map.Entry;
import javax.servlet.http.HttpServletRequest;
import javax.websocket.server.HandshakeRequest;
-import org.apache.tomcat.util.res.StringManager;
-
/**
* Represents the request that this session was opened under.
*/
public class WsHandshakeRequest implements HandshakeRequest {
- private static final StringManager sm =
StringManager.getManager(Constants.PACKAGE_NAME);
-
private final URI requestUri;
private final Map<String,List<String>> parameterMap;
private final String queryString;
@@ -58,34 +54,11 @@ public class WsHandshakeRequest implemen
httpSession = request.getSession(false);
// URI
- // Based on request.getRequestURL() implementation
- StringBuilder sb = new StringBuilder();
- String scheme = request.getScheme();
- int port = request.getServerPort();
- if (port < 0)
- port = 80; // Work around java.net.URL bug
-
- if (scheme.equals("http")) {
- sb.append("ws");
- } else if (scheme.equals("https")) {
- sb.append("wss");
- } else {
- throw new IllegalArgumentException(
- sm.getString("wsHandshakeRequest.unknownScheme", scheme));
- }
- sb.append("://");
- sb.append(request.getServerName());
- if ((scheme.equals("http") && (port != 80))
- || (scheme.equals("https") && (port != 443))) {
- sb.append(':');
- sb.append(port);
- }
- sb.append(request.getRequestURI());
+ StringBuilder sb = new StringBuilder(request.getRequestURI());
if (queryString != null) {
- sb.append('?');
+ sb.append("?");
sb.append(queryString);
}
-
try {
requestUri = new URI(sb.toString());
} catch (URISyntaxException e) {
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1600961&r1=1600960&r2=1600961&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jun 6 16:50:24 2014
@@ -219,16 +219,6 @@
Add more varied endpoints for echo testing. (remm)
</fix>
<fix>
- <bug>56573</bug>: Change the value returned by
- <code>Session.getRequestURI()</code> from the value obtained from
- <code>HttpServletRequest.getRequestURI()</code> plus query string to
the
- value obtained from <code>HttpServletRequest.getRequestURI()</code>
plus
- query string with the scheme changed to ws or wss as appropriate. Note
- that the WebSocket Expert Group is expected to clarify the expected
- behaviour for <code>Session.getRequestURI()</code> which may result in
- further changes. (markt)
- </fix>
- <fix>
<bug>56577</bug>: Improve the executor configuration used for the
callbacks associated with asynchronous writes. (markt)
</fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]