Skip to content
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

Test for both formats of Content-Encoding header #1076

Merged
merged 1 commit into from Sep 30, 2013

Conversation

chapel
Copy link

@chapel chapel commented Sep 27, 2013

Due to some inconsistencies in how headers are formatted through the code, I added an extra check for 'Content-Encoding' as well as 'content-encoding' when determining if the response should be compressed.

This came up due to wanting to manually gzip a response in a handler, and manually setting the 'Content-Encoding' header. If I used the proper format, the existing code would compress my already compressed response.

I feel this is a band-aid to a bigger issue, that is inconsistent header formatting in what is being checked for and what is being added as headers.

I also added tests for GET requests in the gzip integration test, as well was removed a duplicate test near the end.

hueniverse pushed a commit that referenced this pull request Sep 30, 2013
Test for both formats of Content-Encoding header
@hueniverse hueniverse merged commit 257c61e into hapijs:master Sep 30, 2013
@chapel chapel deleted the fix-double-encoding branch September 30, 2013 16:08
jmonster pushed a commit to jmonster/hapi that referenced this pull request Feb 10, 2014
Test for both formats of Content-Encoding header
@lock lock bot locked as resolved and limited conversation to collaborators Jan 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants