If no Accept-Encoding header is sent, koa-compress may compress the response
See original GitHub issueI found it very confusing when I used curl to hit my endpoint and got a compressed response dumped to my console. It seems like if curl doesn’t send the Accept-Encoding
header up it does not decompress the response if it gets a compressed response in return.
Nevertheless, I think a client that does not send Accept-Encoding
should not be assumed to support gzip
or any other compression scheme - by default they should not get any compressed responses.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Accept-Encoding - HTTP - MDN Web Docs
The Accept-Encoding request HTTP header indicates the content encoding (usually a compression algorithm) that the client can understand.
Read more >Force Apache HTTP compression event if no Accept-Encoding ...
I would like to compress the output (probably with gzip), but I cannot modify the client to send a "Accept-Encoding: gzip" header. So...
Read more >"Content-Encoding" response HTTP header is removed when ...
"Content-Encoding" header is removed when forwarding HTTP response from server to client. Server does provide compressed response (for example: ...
Read more >Compression/Decompression with the HTTP Invoke/Get/Post ...
If the endpoint supports compression/decompression ... Compression behavior when sending a request; Accept-Encoding Header value passed to the request.
Read more >Troubleshooting IIS Compression issues in IIS6/IIS7.x
In return, a compressed response from the server will contain the ... If no Accept-Encoding field is present in a request, the server...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I merged the wrong PR haha. You had two, #110 and #120, I merged #110 not #120. I reverted #110 and merged #120 and released to npm.
Strange — I modified the test to not use
unset()
… Are you sure you tested the right thing?