RFC: Drop `compress` option?
See original GitHub issueThere is a standard way to disable compression support in fetch via Accept-Encoding header (works right now in node-fetch
):
const res = await fetch("https://something.com/", {
headers: { "Accept-Encoding": "identity" }
});
Do we really need a Node-only option here?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
RFC 2507: IP Header Compression
RFC 2507 IP Header Compression February 1999 octets. Header compression will decrease the header overhead for IPv6/TCP from 19.5 per cent to less...
Read more >RFC 1144 - Compressing TCP/IP Headers for Low-Speed ...
Compressing TCP/IP Headers for Low-Speed Serial Links (RFC 1144, February 1990) ... a TCP option (the max. segment size) which the following packets...
Read more >Setting RFC Bit Options in SM59 (SAP Library - SAP Help Portal
This option deactivates the compression of the function module tables. This means that tables are no longer compressed before they are sent, which...
Read more >[RFC] Add option to limit llvm-profdata profile output size
Since it is hard to accurately compute the expected output size due to options like --compress-all-sections in extensible binary format, ...
Read more >RFC 9204: QPACK: Field Compression for HTTP/3 - QUIC
This specification defines QPACK: a compression format for efficiently representing HTTP fields that is to be used in HTTP/3. This is a variation...
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 can see a value in keeping this option… specially for those who wish to just proxy/forward a compressed response along. However. I think the name
compress
is slightly confusing. as the name applies that it should compress something while posting data.it should be named something else…
decompress: true
.decode: true
.I disagree that the
compress
option should be removed, but I do think it should be deprecated and renameddecompress
since it controls decompressing the response rather than compressing the request.Consider the scenario where the developer wants to implement their own decompression algorithm, maybe for coursework experimentation:
However, it does seem we should consider changing the behavior when setting
compress: false
to also setAccept-Encoding: identity
. Consider this next example – the response body may or may not be compressed since noAccept-Encoding
header is sent; however, this is likely not what the developer intended:They probably intended this: