Github user SvetlinZarev commented on the issue:
https://github.com/apache/tomcat/pull/39
It's not a no-op. Imagine the following case:
WS-Host: wss://echo.websocket.org
proxy-host: proxy
proxy-port: 8080
The flow is as follows:
URI path = the WS-HOST
String host = path.getHost();
int port = path.getPort(); //-1 if the ":port" part of the authority is
missing
if(hasProxy){
proxyConnect = createProxyRequest(host, port);
}else{
if(-1 == port) then do portDiscovery -> 80/443 depending on
ws/wss scheme
...
}
So here in the proxy case the port will be -1, because WS-Host does not
specify host. As a result the CONNECT request will not contain port in the
request line -> hence invalid CONNECT request.
In the non-proxy case the original code correctly performs port discovery
based on the scheme( if a port is not explicitly provided in WS-Host).
So what I did was to do port discovery if no port is specified, regardless
of proxy configuration.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]