-
Notifications
You must be signed in to change notification settings - Fork 851
Content-type lost when sent after duplicate headers #11821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Collaborator
Author
|
[approve ci autest] |
Collaborator
Author
|
[approve ci format] |
Collaborator
Author
|
[approve ci rat] |
Collaborator
Author
|
[approve ci centos] |
bryancall
approved these changes
Oct 28, 2024
jasmine-nahrain
added a commit
to jasmine-nahrain/trafficserver
that referenced
this pull request
Oct 30, 2024
* Fix for apache#11784 * Just specify content-type not be altered * Update HttpTransact.cc (cherry picked from commit 8671ddb)
bryancall
pushed a commit
that referenced
this pull request
Oct 31, 2024
Contributor
|
Cherry-picked to v10.0.x |
cmcfarlen
pushed a commit
that referenced
this pull request
Oct 31, 2024
masaori335
pushed a commit
to masaori335/trafficserver
that referenced
this pull request
May 29, 2025
* Fix for apache#11784 * Just specify content-type not be altered * Update HttpTransact.cc (cherry picked from commit 8671ddb) (cherry picked from commit 8f16f2d)
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.
Prior to issue #9527, content-type header was being deleted and readded in
merge_response_header_with_cached_headerdespite line 5005 specificaly stating that it should not be overwritten.Once the issue was fixed, if duplicate headers were found and content-type was being sent after one of the duplicate headers, it would be deleted in the for loop at line 5038.
E.g.
once the duplicate header is found, all headers subsequent to the dup are deleted. The intended course of this code is to then have those headers readded in the greater for loop. This works fine for most cases but because content-type is specified to not follow this behaviour, it is getting deleted but never readded.
This adds a secondary check for content-type to not be altered.
This fixes #11784