You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2016/03/07 09:29:21 UTC
[Bug 59134] New: Secure websocket connection through a proxy is not
ok
https://bz.apache.org/bugzilla/show_bug.cgi?id=59134
Bug ID: 59134
Summary: Secure websocket connection through a proxy is not ok
Product: Tomcat 8
Version: trunk
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: WebSocket
Assignee: dev@tomcat.apache.org
Reporter: zraetn@gmail.com
I have been trying to open a wss connection through a http proxy, and I always
got the following exception:
...
Caused by: javax.websocket.DeploymentException: The HTTP request to initiate
the WebSocket connection failed
...
Caused by: java.io.EOFException: null
...
Looking at network traffic shows that the proxy connect request is sent, proxy
connection is established and then a plain GET request is sent instead of the
SSL handshake.
Debugging in the WsWebSocketContainer::connectToServer() shows that there is a
secure flag, to indicate whether an SSL connection is needed, but it never gets
true when the connection is through a proxy.
http://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
public Session connectToServer(Endpoint endpoint,
ClientEndpointConfig clientEndpointConfiguration, URI path)
throws DeploymentException
...
boolean secure = false
...
if (sa == null) {
if (port == -1) {
if ("ws".equalsIgnoreCase(scheme)) {
sa = new InetSocketAddress(host, 80);
} 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 {
proxyConnect = createProxyRequest(host, port);
}
...
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 59134] Secure websocket connection through a proxy is not ok
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59134
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 59134] Secure websocket connection through a proxy is not ok
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59134
Christopher Schultz <ch...@christopherschultz.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
Sounds like your (reverse?) proxy is switching from HTTPS top HTTP internally.
Bugzilla is not a support forum. Please post a message to the users list with
questions, and only reopen this issue if there is a bug discovered in Tomcat.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 59134] Secure websocket connection through a proxy is not ok
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59134
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|INVALID |---
Status|RESOLVED |REOPENED
--- Comment #2 from Mark Thomas <ma...@apache.org> ---
The original report looks valid. secure is never set when using a proxy
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 59134] Secure websocket connection through a proxy is not ok
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59134
--- Comment #3 from Mark Thomas <ma...@apache.org> ---
Thanks for the report. This has been fixed in 9.0.x for 9.0.0.M4 onwards, 8.0.x
for 8.0.33 onwards and 7.0.x for 7.0.69 onwards.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org