Author: markt Date: Fri Jun 28 07:35:49 2013 New Revision: 1497670 URL: http://svn.apache.org/r1497670 Log: WebSocket 1.0, section 8.2 There is an implied restriction that any initial upgrade request must use HTTP GET.
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFilter.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFilter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFilter.java?rev=1497670&r1=1497669&r2=1497670&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFilter.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsFilter.java Fri Jun 28 07:35:49 2013 @@ -77,9 +77,13 @@ public class WsFilter implements Filter !(response instanceof HttpServletResponse) || !headerContainsToken((HttpServletRequest) request, Constants.UPGRADE_HEADER_NAME, - Constants.UPGRADE_HEADER_VALUE)) { + Constants.UPGRADE_HEADER_VALUE) || + !"GET".equals(((HttpServletRequest) request).getMethod())) { // Not an HTTP request that includes a valid upgrade request to // web socket + // Note: RFC 2616 does not limit HTTP upgrade to GET requests but + // the the Java WebSocket spec 1.0, section 8.2 implies such a + // limitation chain.doFilter(request, response); return; } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org