Hi all!

Recently I stumbled in a possible bug in WsWebSocketContainer. When
connecting to server, if the authority in the URI does not contain the
remote port, the proxy rejects the connection. In WsWebSocketContainer the
port is determined based on WS/WSS when constructing the InetSocketAddress
for non-proxied communication. But when using proxy, the WS/WSS scheme is
ignored and the CONNECT request looks like:

CONNECT gmail.com HTTP/1.1

So the proxy does not know to which port to open a tunnel. And as a result
connectToServer() fails with DeploymentException due to the proxy rejecting
the connect request.

Patch proposed: https://github.com/apache/tomcat/pull/39
What do you think ?

Best regards,
Svetlin

Reply via email to