Summary: | Order of invocation of method of ServerEndpointConfig.Configurator | ||
---|---|---|---|
Product: | Tomcat 8 | Reporter: | Simone Bordet <simone.bordet> |
Component: | WebSocket | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ckellner |
Priority: | P2 | ||
Version: | 8.0.x-trunk | ||
Target Milestone: | ---- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Simone Bordet
2014-01-17 08:23:30 UTC
JSR356 specifies at least some of the order. Unfortunately, JSRs have a nasty habit (one I have tried and failed to stop) of splitting information between the spec doc and the Javadoc. You have to read both. The Javadoc for ServerEndpointConfig.Configurator.modifyHandshake() has some information on ordering. It requires that modifyHandshake() is called after checkOrigin(), getNegotiatedExtensions() and getNegotiatedSubprotocol() The discussion on this topic on the EG mailing list did mention getEndpointInstance() happening after modifyHandshake() and I agree that makes sense. I also agree that getNegotiatedSubprotocol() should always be called. You are correct that Tomcat doesn't support any extensions at the moment. That said, I hope to be adding compression support so I'll add the call to getNegotiatedExtensions() while I am making changes here. Fixed in trunk for 8.0.0. I opted not to add the extension header handling as that requires a little more work to parse the headers. I also back-ported the changes to 7.0.x for 7.0.51 onwards. |