mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2026-03-08 06:47:59 -04:00
chore: reduce max_total_size to 256KB (from 1MB)
This commit is contained in:
parent
b0586708a7
commit
9003a13da0
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue