From 9003a13da04985c0b1285e840e213a16c4b3785a Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Mon, 9 Feb 2026 04:21:52 +0000 Subject: [PATCH] chore: reduce max_total_size to 256KB (from 1MB) --- src/core/headers.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/headers.ml b/src/core/headers.ml index d6abb17a..abd016d3 100644 --- a/src/core/headers.ml +++ b/src/core/headers.ml @@ -84,7 +84,7 @@ let parse_line_ (line : string) : _ result = with Failure msg -> Error msg let parse_ ~(buf : Buf.t) ?(max_headers = 100) ?(max_header_size = 16384) - ?(max_total_size = 1048576) (bs : IO.Input.t) : t = + ?(max_total_size = 262144) (bs : IO.Input.t) : t = let rec loop acc count total_size = if count >= max_headers then bad_reqf 431 "too many headers (max: %d)" max_headers;