Enable CURL response decompression#278
Conversation
Change CURLOPT_ACCEPT_ENCODING from NULL to "" so that CURL advertises all supported compression encodings (e.g. gzip, deflate, br, zstd) in the Accept-Encoding header and automatically decompresses responses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable zstd compression support in the curl build so that CURL can advertise and decompress zstd-encoded responses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thanks for the PR, that would make sense, but before enabling this behaviour we would first need to fix duckdb/duckdb to handle receiving those pre-compressed streams. Internal timeline is "nice for 1.5.1, but unclear" |
|
But curl decompresses it for you
…On Sat, Mar 7, 2026 at 06:22 Carlo Piovesan ***@***.***> wrote:
*carlopi* left a comment (duckdb/duckdb-httpfs#278)
<#278 (comment)>
Thanks for the PR, that would make sense, but before enabling this
behaviour we would first need to fix duckdb/duckdb to handle receiving
those pre-compressed streams.
Internal timeline is "nice for 1.5.1, but unclear"
—
Reply to this email directly, view it on GitHub
<#278 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFSWJOPMGNFSIXZKAK3TAT4PQA6XAVCNFSM6AAAAACWKCJGACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAMJWGI4DEMRRGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
I would be OK with adding an option, (that defaults to using NULL) but allows to opt in to "". Would that work for you? The option we might need in any case to avoid regressions. |
|
Hey @carlopi, You should let curl handle the decompression. The whole argument around:
is flawed. HTTP Compression is a content encoding for the transmission over the HTTP request, not a content-type. The content type here should still be application/octet-stream not gzip. I realize how it can be confusing for people, but we need to be pedantic about this. I'd be happy to talk this through more. But I think this original motivation for #263 is flawed. Rusty |
Summary
CURLOPT_ACCEPT_ENCODINGfromNULLto""so CURL advertises all supported compression encodings (gzip, deflate, br, zstd) and automatically decompresses responsesFixes #277
Test plan
Accept-Encodingheader with supported encodings🤖 Generated with Claude Code