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.

Support Accept-Encoding: gzip

See original GitHub issue

Streaming text data (Event-source) is a perfect candidate for gzip. It would be awesome if this module supported gzip.

It can be enabled by default safely:

  • Announce gzip support with the Accept-Encoding header
  • Only decompress the response if the server responds with Content-Encoding: gzip

See https://stackoverflow.com/a/14739453/977939.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
aslakhellesoycommented, Sep 21, 2017

The EventSource protocol is built on top of the HTTP protocol, so if gzip is supported in HTTP (it is), that makes it implicitly supported in EventSource too, doesn’t it?

0reactions
pirannacommented, Sep 21, 2017

The EventSource protocol is built on top of the HTTP protocol, so if gzip is supported in HTTP (it is), that makes it implicitly supported in EventSource too, doesn’t it?

I think so, just only it seemsed to me to be a corner case and wanted to confirm if it actually worked. Having confirmed that, pull-requests are welcome 😃 I think it can be checked and done directly and explicitly, or maybe by using gunzip-maybe, but it could add some boilerplate, too.

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 >
Accept-Encoding:gzip and Content-Encoding:gzip
Accept -Encoding: It is a request header. The HTTP client uses this header to tell the server which encoding(s) it supports.
Read more >
What does `Accept-Encoding: gzip,deflate` mean? - Server Fault
It means the client can accept a response which has been compressed using the DEFLATE algorithm. https://en.wikipedia.org/wiki/Deflate This ...
Read more >
How to Enable GZIP Compression for Faster Web Pages
Click one resource to view its contents. Make sure you have the Headers tab selected, then scroll down to the content-encoding header to...
Read more >
HTTP headers | Accept-Encoding - GeeksforGeeks
HTTP headers | Accept-Encoding · gzip: It is a compression format using the Lempel-Ziv coding (LZ77), with a 32-bit CRC. · compress: It...
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