diff --git a/sapi/cli/php_http_parser.c b/sapi/cli/php_http_parser.c index 252c5fcf7598..abaa595091d8 100644 --- a/sapi/cli/php_http_parser.c +++ b/sapi/cli/php_http_parser.c @@ -195,7 +195,7 @@ static const uint8_t normal_url_char[256] = { 1, 1, 1, 1, 1, 1, 1, 0 }; -#define PARSING_HEADER(state) (state <= s_headers_almost_done && 0 == (parser->flags & F_TRAILING)) +#define PARSING_HEADER(state) (state <= s_headers_almost_done) enum header_states diff --git a/sapi/cli/tests/gh24115.phpt b/sapi/cli/tests/gh24115.phpt new file mode 100644 index 000000000000..02e3d18696b0 --- /dev/null +++ b/sapi/cli/tests/gh24115.phpt @@ -0,0 +1,38 @@ +--TEST-- +GH-24115 (CLI server: chunked request trailers are not limited by the header size limit) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +small trailer: 200 +oversized trailer: rejected +after rejection: 200