]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
quiche: set the max field section size
authorGraham Campbell <hello@gjcampbell.co.uk>
Wed, 15 Jul 2026 11:52:21 +0000 (12:52 +0100)
committerViktor Szakats <commit@vsz.me>
Wed, 15 Jul 2026 19:52:07 +0000 (21:52 +0200)
quiche 0.29.3 started enforcing a default
`SETTINGS_MAX_FIELD_SECTION_SIZE` of 32 KiB, so larger response headers
now shut down the whole connection with `CURLE_HTTP3`. curl accepts up
to 300 KiB of response headers with every other backend and HTTP
version. Tell quiche to allow what curl itself allows. This keeps
test_01_11 passing with quiche 0.29.3 and it also advertises our real
limit to servers, which the RFC encourages.

Ref: 899e2edec95b3df01db63ad219d3c5547a3e3ae5 #22333
Ref: #22329
Ref: #22325
Ref: https://github.com/cloudflare/quiche/commit/9be0e4fa18594a5cca00120f6ae392e217e837e5
Ref: https://github.com/cloudflare/quiche/releases/tag/0.29.3

Closes #22331

lib/vquic/cf-quiche.c

index 479fbe3b637c891dcf4b6a4689a9f4377c659d91..b38ab7d3e957a870e012e218d96bf7b2f72a62e7 100644 (file)
@@ -40,6 +40,7 @@
 #include "connect.h"
 #include "progress.h"
 #include "select.h"
+#include "http.h"
 #include "http1.h"
 #include "sockaddr.h"
 #include "vquic/vquic.h"
@@ -1429,6 +1430,10 @@ static CURLcode cf_quiche_connect(struct Curl_cfilter *cf,
         result = CURLE_OUT_OF_MEMORY;
         goto out;
       }
+      /* quiche 0.29.3+ rejects response headers larger than 32 KiB by
+         default. Allow as much as curl itself accepts. */
+      quiche_h3_config_set_max_field_section_size(ctx->h3config,
+                                                  MAX_HTTP_RESP_HEADER_SIZE);
 
       /* Create a new HTTP/3 connection on the QUIC connection. */
       ctx->h3c = quiche_h3_conn_new_with_transport(ctx->qconn, ctx->h3config);