]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Limit X-Bloat header size to 100KB
authorMichal Nowak <mnowak@isc.org>
Tue, 25 Mar 2025 13:14:52 +0000 (14:14 +0100)
committerMichal Nowak <mnowak@isc.org>
Tue, 25 Mar 2025 15:53:29 +0000 (15:53 +0000)
Otherwise curl 8.13 rejects the line with:

    I:Check HTTP/1.1 keep-alive with truncated stream (21)
    curl: option --header: error encountered when reading a file
    curl: try 'curl --help' or 'curl --manual' for more information

Also, see https://github.com/curl/curl/pull/16572.

(cherry picked from commit bcb931f4a8f91a5bcae5d13a0fb809feff767b63)

bin/tests/system/statschannel/tests.sh

index cb5fb2303fcd1e63018e5b515edb79be6aabe475..8d17e974abf0f59c21daa1c59306651c60098284 100644 (file)
@@ -591,7 +591,8 @@ i=0
 if [ -x "${CURL_NEXT}" ]; then
   # build input stream.
   printf 'X-Bloat: ' >header.in$n
-  while test $i -lt 5000; do
+  # curl 8.13 and newer rejects to read line larger than 100KB
+  while test $i -lt 1023; do
     printf '%s' "VGhlIG1vc3QgY29tbW9uIHJlYXNvbiBmb3IgYmxvYXRpbmcgaXMgaGF2aW5nIGEgbG90IG9mIGdhcyBpbiB5b3VyIGd1dC4gCg==" >>header.in$n
     i=$((i + 1))
   done