question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

If no Accept-Encoding header is sent, koa-compress may compress the response

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
niftylettucecommented, Jul 6, 2020

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.

0reactions
uhopcommented, Jul 6, 2020

Strange — I modified the test to not use unset()… Are you sure you tested the right thing?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found