jakartaee / websocket

Jakarta WebSocket
https://projects.eclipse.org/projects/ee4j.websocket
Other
60 stars 41 forks source link

Interaction with Servlet Filters, Listeners and RequestDispatchers is unclear #188

Open glassfishrobot opened 11 years ago

glassfishrobot commented 11 years ago

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]

glassfishrobot commented 6 years ago
glassfishrobot commented 11 years ago

@glassfishrobot Commented Reported by gregwilkins

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA WEBSOCKET_SPEC-188