http2: double http request parser max line length
No binary (build failed)
—
$ git checkout -f 77c9a9845bbee66f3aff158b8452dc8cd963cbd5
Previous HEAD position was 92772e6d39 urlapi: allow numerical parts in the host name
HEAD is now at 77c9a9845b http2: double http request parser max line length
$ git clean -fdx
Removing Makefile.in
Removing aclocal.m4
Removing autom4te.cache/
Removing compile
Removing confdefs.h
Removing config.guess
Removing config.log
Removing config.sub
Removing configure
Removing conftest.c
Removing depcomp
Removing docs/Makefile.in
Removing docs/cmdline-opts/Makefile.in
Removing docs/examples/Makefile.in
Removing docs/libcurl/Makefile.in
Removing docs/libcurl/opts/Makefile.in
Removing include/Makefile.in
Removing include/curl/Makefile.in
Removing install-sh
Removing lib/Makefile.in
Removing lib/curl_config.h.in
Removing ltmain.sh
Removing m4/libtool.m4
Removing m4/ltoptions.m4
Removing m4/ltsugar.m4
Removing m4/ltversion.m4
Removing m4/lt~obsolete.m4
Removing missing
Removing packages/Makefile.in
Removing packages/vms/Makefile.in
Removing run-compiler
Removing scripts/Makefile.in
Removing src/Makefile.in
Removing test-driver
Removing tests/Makefile.in
Removing tests/certs/Makefile.in
Removing tests/certs/scripts/Makefile.in
Removing tests/data/Makefile.in
Removing tests/http/Makefile.in
Removing tests/http/clients/Makefile.in
Removing tests/libtest/Makefile.in
Removing tests/server/Makefile.in
Removing tests/unit/Makefile.in
$ autoreconf -fi
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Remember to add 'LT_INIT' to configure.ac.
configure.ac:123: installing './compile'
configure.ac:439: installing './config.guess'
configure.ac:439: installing './config.sub'
configure.ac:123: installing './install-sh'
configure.ac:129: installing './missing'
docs/examples/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
$ bash -c find . -name config.guess -exec cp /usr/share/misc/config.guess {} \;
$ bash -c find . -name config.sub -exec cp /usr/share/misc/config.sub {} \;
$ chmod +x configure
$ ./configure --disable-shared --without-ssl --disable-docs
[TIMEOUT]
| @@ -33,6 +33,8 @@ | |
| #define H1_PARSE_OPT_NONE (0) | |
| #define H1_PARSE_OPT_STRICT (1 << 0) | |
| + | #define H1_PARSE_DEFAULT_MAX_LINE_LEN (8 * 1024) |
| + | |
| struct h1_req_parser { | |
| struct http_req *req; | |
| struct bufq scratch; | |
| @@ -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); | |
| @@ -575,7 +575,7 @@ static ssize_t cf_msh3_send(struct Curl_cfilter *cf, struct Curl_easy *data, | |
| CF_DATA_SAVE(save, cf, data); | |
| - | 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); | |
| /* Sizes must match for cast below to work" */ | |
| @@ -1550,7 +1550,7 @@ static ssize_t h3_stream_open(struct Curl_cfilter *cf, | |
| nghttp3_data_reader reader; | |
| nghttp3_data_reader *preader = NULL; | |
| - | 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 = h3_data_setup(cf, data); | |
| @@ -913,7 +913,7 @@ static ssize_t h3_open_stream(struct Curl_cfilter *cf, | |
| DEBUGASSERT(stream); | |
| } | |
| - | 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); | |
| DEBUGASSERT(stream); | |