You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Svetlin Zarev <sv...@gmail.com> on 2017/01/13 10:51:42 UTC

Web sockets - issue with proxy handling

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