mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-25 10:58:20 -10:00
SocketsHttpHandler wasn't even trying to send Negotiate/NTLM auth tokens to a proxy. This was due to some invalid logic regarding the "usingProxy" field in HttpConnection. Reworked this logic to be clearer about the various kinds of proxy scenarios. I refactored the loopback proxy server and made it much more robust. It can now handle multiple requests and multiple connections which helps test against the other handlers whose behavior is different in this area. I plan to do further work in consolidating the LoopbackServer and LoopbackProxyServer classes in future PRs. I created a separate HttpClientHandlerTest.Proxy.cs file and moved many existing proxy tests and added new tests. The current HttpClientHandlerTest.cs file is still over 3000 lines and needs more refactoring to make it easier to maintain and track test scenario coverage. Fixes dotnet/corefx#30330 Commit migrated from https://github.com/dotnet/corefx/commit/ec1671fd7feffe1070a94d9d86379e0dd95ddcdf