Author: markt
Date: Mon Mar  7 19:41:36 2016
New Revision: 1733963

URL: http://svn.apache.org/viewvc?rev=1733963&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=59134
Correct client connect logic for secure connections made through a proxy.

Modified:
    tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1733963&r1=1733962&r2=1733963&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Mon 
Mar  7 19:41:36 2016
@@ -202,6 +202,7 @@ public class WsWebSocketContainer implem
             proxyPath = URI.create("http" + path.toString().substring(2));
         } else if ("wss".equalsIgnoreCase(scheme)) {
             proxyPath = URI.create("https" + path.toString().substring(3));
+            secure = true;
         } else {
             throw new DeploymentException(sm.getString(
                     "wsWebSocketContainer.pathWrongScheme", scheme));
@@ -243,12 +244,8 @@ public class WsWebSocketContainer implem
                 } else {
                     // Must be wss due to scheme validation above
                     sa = new InetSocketAddress(host, 443);
-                    secure = true;
                 }
             } else {
-                if ("wss".equalsIgnoreCase(scheme)) {
-                    secure = true;
-                }
                 sa = new InetSocketAddress(host, port);
             }
         } else {

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1733963&r1=1733962&r2=1733963&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Mar  7 19:41:36 2016
@@ -216,6 +216,10 @@
         <bug>59119</bug>: Correct read logic for WebSocket client when using
         secure connections. (markt)
       </fix>
+      <fix>
+        <bug>59134</bug>: Correct client connect logic for secure connections
+        made through a proxy. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Web applications">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to