You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
curl not detecting corrupt compressed data as an error #23615
libcurl doesn't consider invalid compressed data as an error. This appears to be somewhat by design for deflate and gzip, but surely brotli shouldn't behave in this way?
None of these are considered an error by curl --compressed http://localhost:9999/x -O and produce a 0 byte file.
For brotli the issue seems to be that when BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT occurs there is no way for the brotli_do_write to communicate that further data is necessary and if none is available this should be considered an error.
I expected the following
libcurl to behave more consistently with corrupt compressed data (at least with brotli). When data is corrupt error should be returned and no partial file created.
Activity
akasakariko commentedon Oct 28, 2026
I'd like to work on this
content_encoding: reject incomplete brotli streams
content encoding: reject incomplete zlib streams (gzip, deflate)