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:
Simone Bordet 2016-05-16 11:25:54 +02:00
parent e5062a74dd
commit 67ea8db5aa
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}