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 2012/08/02 14:52:08 UTC

[Bug 53641] New: Wrong websocket's subprotocol implementation

https://issues.apache.org/bugzilla/show_bug.cgi?id=53641

          Priority: P2
            Bug ID: 53641
          Assignee: dev@tomcat.apache.org
           Summary: Wrong websocket's subprotocol implementation
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: wolfst@in.tum.de
          Hardware: All
            Status: NEW
           Version: 7.0.29
         Component: Catalina
           Product: Tomcat 7

According to RFC6455 Section 4.3. the handling of subprotocol requests is not
correct.
It must be checked for "Sec-WebSocket-Protocol" instead of
"Sec-WebSocket-Protocol-Client" in WebSocketServlet class.

-- 
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 53641] Wrong websocket's subprotocol implementation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53641

Stephan Wolf <wo...@in.tum.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wolfst@in.tum.de

-- 
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 53641] Wrong websocket's subprotocol implementation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53641

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Fixed in trunk and 7.0.x and will be included in 7.0.30 onwards.

Thanks for the report.

-- 
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 53641] Wrong websocket's subprotocol implementation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53641

--- Comment #2 from Stephan Wolf <wo...@in.tum.de> ---
Thanks a lot!

By the way, here is workaround for those who can't wait:
Just add the following code into your WebsocketServlet:

@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
  HttpServletRequestWrapper wrapper = new HttpServletRequestWrapper(req){
    @Override
    public Enumeration<String>  getHeaders(String name) {
      if(name.equals("Sec-WebSocket-Protocol-Client")){
       return super.getHeaders("Sec-Websocket-Protocol");
      }
      return super.getHeaders(name);
    }
  };
  super.doGet(wrapper, resp);
}

-- 
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