Skip to content

Test for both formats of Content-Encoding header#1076

Merged
hueniverse merged 1 commit intohapijs:masterfrom
chapel:fix-double-encoding
Sep 30, 2013
Merged

Test for both formats of Content-Encoding header#1076
hueniverse merged 1 commit intohapijs:masterfrom
chapel:fix-double-encoding

Conversation

@chapel
Copy link
Copy Markdown

@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.

2 participants