Skip to content

Conversation

@AnyOldName3
Copy link
Contributor

Previously, the curl loader would not send an accept-encoding header, so was relying on HTTP servers deciding to transmit an uncompressed response. If they sent a compressed response instead (as is permitted by the HTTP spec), it would be passed to the next loader still compressed.

This change tells curl to inform the server about all the compression algorithms it supports (typically constrained by the curl version and which libraries were available when it was built). It also tells curl to decompress the data it receives according to the server's content-encoding header before giving it to us.

As a result, most network requests will be smaller and faster (as servers can be confident that we can decompress their responses), and in rarer situations where servers refuse to give uncompressed responses, compatibility should be better.

Previously, the curl loader would not send an accept-encoding header, so was relying on HTTP servers deciding to transmit an uncompressed response.
If they sent a compressed response instead (as is permitted by the HTTP spec), it would be passed to the next loader still compressed.

This change tells curl to inform the server about all the compression algorithms it supports (typically constrained by the curl version and which libraries were available when it was built).
It also tells curl to decompress the data it receives according to the server's content-encoding header before giving it to us.

As a result, most network requests will be smaller and faster (as servers can be confident that we can decompress their responses), and in rarer situations where servers refuse to give uncompressed responses, compatibility should be better.
@robertosfield robertosfield merged commit 9a48d93 into vsg-dev:master Dec 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants