[6.0] fd9bf7e62 param: Restore old default h2_max_header_list_size

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Apr 4 19:17:06 UTC 2024


commit fd9bf7e62ade376fd580b8a0924fc7f3d2b3138d
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Apr 4 19:18:12 2024 +0200

    param: Restore old default h2_max_header_list_size
    
    Except that the old default value replaces the maximum one. Aligning
    with the literal maximum value for the underlying HTTP/2 setting breaks
    32bit builds because the byte tweaks take a detour via ssize_t. When it
    casts to uintmax_t the MSB is propagated all the way, triggering the
    following error at build time:
    
    > 4294967295b is too large for this architecture.
    
    Instead of fighting a tweak that is clearly wrong, grant h2 clients a
    maximum of 2GB of uncompressed headers (instead of 4GB) that will never
    happen, because h2 is overall much wronger.
    
    Conflicts:
            include/tbl/params.h

diff --git a/include/tbl/params.h b/include/tbl/params.h
index 2cb61260a..d3732a0d1 100644
--- a/include/tbl/params.h
+++ b/include/tbl/params.h
@@ -1896,7 +1896,7 @@ PARAM(
 	/* name */      h2_max_header_list_size,
 	/* typ */       bytes_u,
 	/* min */       "0b",
-	/* max */	"4294967295b",
+	/* max */       "2147483647b", /* NB: not the RFC maximum */
 	/* default */	"0b",
 	/* units */     "bytes",
 	/* flags */     0,


More information about the varnish-commit mailing list