← Commit list

049ec8a363

Stefan Eissing
Stefan Eissing
2026-05-27
SUCCESS Duration: 278s

Subject

content_encoding: fix limit failure message

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/content_encoding.c+4 -3
@@ -750,9 +750,10 @@ CURLcode Curl_build_unencoding_stack(struct Curl_easy *data,
return CURLE_OK;
}
- if(Curl_cwriter_count(data, phase) + 1 >= MAX_ENCODE_STACK) {
- failf(data, "Reject response due to more than %d content encodings",
- MAX_ENCODE_STACK);
+ if(Curl_cwriter_count(data, phase) >= MAX_ENCODE_STACK) {
+ failf(data, "Reject response exceeding limit of %d %s encodings",
+ MAX_ENCODE_STACK,
+ is_transfer ? "transfer" : "content");
return CURLE_BAD_CONTENT_ENCODING;
}
tests/data/test387+1 -1
@@ -51,7 +51,7 @@ Connection: TE
61
</errorcode>
<stderr mode="text">
-curl: (61) Reject response due to more than 5 content encodings
+curl: (61) Reject response exceeding limit of 5 transfer encodings
</stderr>
</verify>
</testcase>
tests/data/test418+1 -1
@@ -59,7 +59,7 @@ Connection: TE
61
</errorcode>
<stderr mode="text">
-curl: (61) Reject response due to more than 5 content encodings
+curl: (61) Reject response exceeding limit of 5 transfer encodings
</stderr>
</verify>
</testcase>