Repository navigation
Preserve response status in HTTP authentication drain failures - #136795
Open
RutulPatel8 wants to merge 2 commits into
Open
RutulPatel8 wants to merge 2 commits into
RutulPatel8 wants to merge 2 commits into
Conversation
|
Azure Pipelines: Successfully started running 4 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @karelz, @dotnet/ncl |
Member
|
Can you please add test cases for these fixes? |
Contributor
Author
|
I added two NTLM loopback tests in 6447d4a for the pre-drain close and size-limit drain paths. Both assert UserAuthenticationError and the 401 status. They compile, and both reproduce the missing StatusCode against the installed unpatched runtime. The PR description now includes the validation details. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #105700
HttpConnection.DrainResponseAsyncthrowsHttpRequestExceptionfor two authentication drain failures after receiving a response. Those exceptions did not carry the response status, even though it is available at both call sites.Pass
response.StatusCodeto the exception so callers can inspect the failed authentication response. The proxy tunnel case identified in the issue already forwards its status on current main. Added NTLM loopback tests for both the pre-drain close and size-limit drain failure paths.Validation: the System.Net.Http library and Windows functional test project build with zero warnings or errors. Both new tests reach the intended failure paths and reproduce the missing status against the installed unpatched runtime. The PR-built runtime could not be run locally because the repository testhost requires Visual Studio C++ tools on this machine.