💡feat: allow for simpler override of Response header encoding of Forwarded Requests#2254
Merged
MihaZupan merged 11 commits intodotnet:mainfrom Sep 22, 2023
ChintanRaval:add-support-for-http-client-response-header-encoding
Merged
💡feat: allow for simpler override of Response header encoding of Forwarded Requests#2254MihaZupan merged 11 commits intodotnet:mainfrom ChintanRaval:add-support-for-http-client-response-header-encoding
MihaZupan merged 11 commits intodotnet:mainfrom
ChintanRaval:add-support-for-http-client-response-header-encoding
Conversation
…ResponseHeaderEncoding appropriately
Contributor
Author
|
resolves #1346 |
ChintanRaval
commented
Sep 15, 2023
Contributor
Author
|
I'll suss out the license agreement soon once I figure out what exact company name to use wiht my employer. |
…ttpClientConfig.ResponseHeaderEncoding appropriately
MihaZupan
approved these changes
Sep 19, 2023
Member
There was a problem hiding this comment.
The change looks good, thanks.
I don't really mind exposing the option given we have a corresponding setting for request headers already, but I question the usefulness of having it in the config given that Kestrel uses a different default for response headers, forcing you into making code changes anyway.
Contributor
Author
|
@microsoft-github-policy-service agree company="PageUpPeople" |
MihaZupan
reviewed
Sep 21, 2023
…server (with e.g. Kestrel) options for header encoding to match SocketsHttpHandler's header encoding options
MihaZupan
reviewed
Sep 22, 2023
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.
Overview
This change intends to allow consumers to be able to choose tolerance for non-default (non-ASCII) encoding of Response headers for forwarded requests by leveraging
SocketsHttpHandler.ResponseHeaderEncodingSelector. The idea is to provide something similar to the existingHttpClientConfig.RequestHeaderEncodingproperty via a newHttpClientConfig.ResponseHeaderEncodingproperty.Hopefully, this helps close #1346 and helps simplify solution for #2076.
Changes
SocketsHttpHandler.ResponseHeaderEncodingSelectorvia newResponseHeaderEncodingmember inHttpClientConfigForwarderHttpClientFactory.ConfigureHandlerTesting
No additional testing has been performed other than relying on CI to validate updated & newly added tests in code. Happy to discuss more testing if required.