tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53641] Wrong websocket's subprotocol implementation
Date Tue, 14 Aug 2012 10:30:45 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53641

--- Comment #2 from Stephan Wolf <wolfst@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


Mime
View raw message