Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x

This commit is contained in:
Lachlan Roberts 2021-09-08 19:04:13 +10:00
commit ac39c2599a
2 changed files with 7 additions and 1 deletions

View File

@ -31,10 +31,10 @@ import org.eclipse.jetty.websocket.core.WebSocketComponents;
public abstract class WebSocketNegotiation
{
private final Request baseRequest;
private final HttpServletRequest request;
private final HttpServletResponse response;
private final WebSocketComponents components;
private Request baseRequest;
private String version;
private List<ExtensionConfig> offeredExtensions;
private List<ExtensionConfig> negotiatedExtensions;
@ -54,6 +54,11 @@ public abstract class WebSocketNegotiation
return baseRequest;
}
public void upgrade()
{
this.baseRequest = null;
}
public HttpServletRequest getRequest()
{
return request;

View File

@ -167,6 +167,7 @@ public abstract class AbstractHandshaker implements Handshaker
// Save state from request/response and remove reference to the base request/response.
upgradeRequest.upgrade();
upgradeResponse.upgrade();
negotiation.upgrade();
if (LOG.isDebugEnabled())
LOG.debug("upgrade connection={} session={} framehandler={}", connection, coreSession, handler);