websocket icon indicating copy to clipboard operation
websocket copied to clipboard

Interaction with Servlet Filters, Listeners and RequestDispatchers is unclear

Open glassfishrobot opened this issue 11 years ago • 3 comments

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 avatar Apr 18 '13 02:04 glassfishrobot

  • Issue Imported From: https://github.com/javaee/websocket-spec/issues/188
  • Original Issue Raised By:@glassfishrobot
  • Original Issue Assigned To: @pavelbucek

glassfishrobot avatar Feb 12 '18 08:02 glassfishrobot

@glassfishrobot Commented Reported by gregwilkins

glassfishrobot avatar Apr 18 '13 02:04 glassfishrobot

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

glassfishrobot avatar Apr 24 '17 11:04 glassfishrobot