Support Accept-Encoding: gzip
See original GitHub issueStreaming 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
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (4 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 >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 >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
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.