Summary: | Wrong websocket's subprotocol implementation | ||
---|---|---|---|
Product: | Tomcat 7 | Reporter: | Stephan Wolf <wolfst> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | wolfst |
Priority: | P2 | ||
Version: | 7.0.29 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Stephan Wolf
2012-08-02 12:52:08 UTC
Fixed in trunk and 7.0.x and will be included in 7.0.30 onwards. Thanks for the report. 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); } |