mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-23 03:39:35 -10:00
Recent changes due to PR dotnet/corefx#3199 caused `HttpClient` on Windows to miss `Set-Cookie` response headers when one of the header values was large enough to cause `WinHttpQueryHeaders` to fail with `ERROR_INSUFFICIENT_BUFFER` and advance the index. This commit addresses the regression, by always setting the index back to the index we want to retrieve. Added a new test to validate this change. Fixes dotnet/corefx#6737. Commit migrated from https://github.com/dotnet/corefx/commit/f7e9f00aba800d2ea63e040deafcc7ee220331fc