Skip to content

content_encoding: give a clear error on multi-member gzip#22172

Open
HwangRock wants to merge 1 commit into
curl:masterfrom
HwangRock:gzip-multimember-error
Open

content_encoding: give a clear error on multi-member gzip#22172
HwangRock wants to merge 1 commit into
curl:masterfrom
HwangRock:gzip-multimember-error

Conversation

@HwangRock

Copy link
Copy Markdown

Follow-up to the discussion in #22156.

Rather than decoding multi-member gzip responses, this keeps curl failing
on them as discussed there, but swaps the bare CURLE_WRITE_ERROR for a
message that says what actually happened.

When inflate reaches the end of the first gzip member and the next bytes
are another gzip header (1f 8b), curl now fails with:

curl: (23) Multi-member gzip response not supported

instead of the generic "Failed writing received data to disk/application",
which gave no hint about the cause.

Adds test 2305.

Ref: #22156

A gzip Content-Encoding response holding more than one gzip member made
curl decode the first member and then fail the transfer with a bare
CURLE_WRITE_ERROR and no hint about the cause. Detect the trailing
member and fail with a message that explains what happened.

Ref: curl#22156
@github-actions github-actions Bot added the tests label Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant