websocket
websocket copied to clipboard
Interaction with Servlet Filters, Listeners and RequestDispatchers is unclear
The spec is unclear as to when ServerEndpointConfig instances registered with a ServerContainer and Endpoint onOpen methods are invoked.
Consider a JSR356 enabled servlet container with the following mappings
/* SomeFilter /foo/bar/* FooBarServlet /foo/
{param}
/* MyEndpointConfig /other/* OtherServlet
Is the SomeFilter doFilter method invoked for a websocket upgrade request to /foo/bar/info ?
If so, does the getServletPath method return the mapping for the FooBarServlet or the MyEndpointConfig? What happens if the filter wraps the request, can this effect the matching to an EndpointConfig?
If the checkOrigin method returns false, is the request then handled normally by the Filter and Servlet?
If a websocket upgrade request is received with a URI of /other/info, can the OtherServet use a RequestDispatcher.forward to /foo/bar/info and have the connection accepted by the MyEndpointConfig ?
Similarly, are ServletRequestListener instances called before/after websocket handshake handling and if so, what is the getServletPath set to?
Affected Versions
[1.0]
- Issue Imported From: https://github.com/javaee/websocket-spec/issues/188
- Original Issue Raised By:@glassfishrobot
- Original Issue Assigned To: @pavelbucek
@glassfishrobot Commented Reported by gregwilkins
@glassfishrobot Commented This issue was imported from java.net JIRA WEBSOCKET_SPEC-188