-
Notifications
You must be signed in to change notification settings - Fork 50
Closed
Description
The sample for the Spring Boot integration works fine.
However there is an issue with the WebSocket Handler class, in particular the way the http handler method is defined.
@RequestMapping(
value = "/engine.io/",
method = {RequestMethod.GET, RequestMethod.POST, RequestMethod.OPTIONS},
headers = "Connection!=Upgrade")
public void httpHandler(HttpServletRequest request, HttpServletResponse response) throws IOException {
mEngineIoServer.handleRequest(request, response);
}
One must ensure that this Handler is only called when the client is not requesting a protocol upgrade. However the comparison in the headers evaluation is case sensitive. Some reverse proxies and loadbalancers like AWS Application Loadbalancer tend to correct the actual content of the Connection header and supply it as lowercase. In this case, in order to be able to run both
@RequestMapping(
value = "/engine.io/",
method = {RequestMethod.GET, RequestMethod.POST, RequestMethod.OPTIONS},
headers = {"connection!=Upgrade", "connection!=upgrade"})
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels