chore: reduce max_total_size to 256KB (from 1MB)

This commit is contained in:
Simon Cruanes 2026-02-09 04:21:52 +00:00
parent b0586708a7
commit 9003a13da0

View file

@ -84,7 +84,7 @@ let parse_line_ (line : string) : _ result =
with Failure msg -> Error msg with Failure msg -> Error msg
let parse_ ~(buf : Buf.t) ?(max_headers = 100) ?(max_header_size = 16384) 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 = let rec loop acc count total_size =
if count >= max_headers then if count >= max_headers then
bad_reqf 431 "too many headers (max: %d)" max_headers; bad_reqf 431 "too many headers (max: %d)" max_headers;