http2: double http request parser max line length

This works around #11138, by doubling the limit, and should be a
relatively safe fix.

Ideally the buffer would grow as needed and there would be no need for a
limit? But that might be follow-up material.

Fixes #11138
Closes #11139
This commit is contained in:
Emilio Cobos Álvarez 2023-05-18 18:22:57 +02:00 committed by Daniel Stenberg
parent 81f3c4bc65
commit 77c9a9845b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 6 additions and 4 deletions

View file

@ -1860,7 +1860,7 @@ static ssize_t h2_submit(struct stream_ctx **pstream,
nghttp2_priority_spec pri_spec;
ssize_t nwritten;
Curl_h1_req_parse_init(&h1, (4*1024));
Curl_h1_req_parse_init(&h1, H1_PARSE_DEFAULT_MAX_LINE_LEN);
Curl_dynhds_init(&h2_headers, 0, DYN_HTTP_REQUEST);
*err = http2_data_setup(cf, data, &stream);