Always copy the request metadata.
This is necessary because the HTTP/1.1 machinery will recycle the Metadata.Request object, and it may race with a thread dispatch to the HTTP/2 machinery that will handle the request.
This commit is contained in:
parent
e5062a74dd
commit
67ea8db5aa
|
@ -189,7 +189,7 @@ public class HTTP2ServerConnection extends HTTP2Connection implements Connection
|
|||
upgradeFrames.add(new PrefaceFrame());
|
||||
upgradeFrames.add(settingsFrame);
|
||||
// Remember the request to send a response from onOpen().
|
||||
upgradeFrames.add(new HeadersFrame(1, request, null, true));
|
||||
upgradeFrames.add(new HeadersFrame(1, new Request(request), null, true));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue