Content compression executors no longer remove headers from the original response message #743
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.
Presently the content compression executors remove headers content related headers from the original response message to make it consistent with properties of the content entity. This is conceptually wrong. The content entity associated with the response message has its own content properties (content-length, content-type, content-encoding, etc) that can differ from those of the original message. As long as those properties correctly reflect the content produced be the entity there is no need to mutate the original response message itself, and there can be legitimate reasons for the caller to see the actual response headers.
I propose we change the content compression executors to stop removing content related headers from the original response message,