Skip to content

Commit

Permalink
Fixup pRequestInfo after GCs (#50447)
Browse files Browse the repository at this point in the history
  • Loading branch information
NGloreous committed Sep 1, 2023
1 parent 8ec9186 commit bc60047
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,12 @@ private IReadOnlyDictionary<int, ReadOnlyMemory<byte>> GetRequestInfo(IntPtr bas

var info = new Dictionary<int, ReadOnlyMemory<byte>>(count);

long fixup = (byte*)nativeRequest - (byte*)baseAddress;
var pRequestInfo = (HttpApiTypes.HTTP_REQUEST_INFO*)((byte*)nativeRequest->pRequestInfo + fixup);

for (var i = 0; i < count; i++)
{
var requestInfo = nativeRequest->pRequestInfo[i];
var requestInfo = pRequestInfo[i];
var offset = (long)requestInfo.pInfo - (long)baseAddress;
info.Add(
(int)requestInfo.InfoType,
Expand Down

0 comments on commit bc60047

Please sign in to comment.