You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Http session isn't available from com.codeminders.socketio.server.Socket with websocket transport at least in Jetty 9.4.7 #22
Http session isn't available from com.codeminders.socketio.server.Socket with websocket transport at least in Jetty 9.4.7 because of method org.eclipse.jetty.websocket.servlet.UpgradeHttpServletRequest#complete :
public void complete()
{
request = null;
}
As a workaround I have overridden WebsocketConfigurator#modifyHandshake :
@Override
public void modifyHandshake(
ServerEndpointConfig config,
HandshakeRequest request,
HandshakeResponse response
){
request.getHttpSession(); // it causes session "caching" in UpgradeHttpServletRequest
super.modifyHandshake(config, request, response);
}
But it looks like a hack and it isn't so reliable.
And more, @ServerEndpoint(value="/socket.io/", configurator = WebsocketConfigurator.class) on WebsocketTransportConnection does not allow easy override configurator.
It would be great if to make WebsocketTransportConnection non final or create abstract base class with all its functionality to allow easy annotation configuration
Activity
Geminist commentedon Oct 3, 2019
It would be great if to make
WebsocketTransportConnectionnon final or create abstract base class with all its functionality to allow easy annotation configuration