]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Crossport: r1758672
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 22 Dec 2016 22:25:14 +0000 (22:25 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 22 Dec 2016 22:25:14 +0000 (22:25 +0000)
commit18a1da2913e751dba5df53db9ed144f556f537f6
tree243506256f870522a61a0a3ac4964bd1b9da3a21
parentc27a8678a9e5aba9f3c194b29ed57db0b9afda4e
Crossport: r1758672
Backports: r1710095, r1727544
Submitted by: ylavic, rpluem

core: Limit to ten the number of tolerated empty lines between request,
and consume them before the pipelining check to avoid possible response
delay when reading the next request without flushing.

Before this commit, the maximum number of empty lines was the same as
configured LimitRequestFields, defaulting to 100, which was way too much.
We now use a fixed/hard limit of 10 (DEFAULT_LIMIT_BLANK_LINES).

check_pipeline() is changed to check for (up to the limit) and comsume the
trailing [CR]LFs so that they won't be interpreted as pipelined requests,
otherwise we would block on the next read without flushing data, and hence
possibly delay pending response(s) until the next/real request comes in or
the keepalive timeout expires.

Finally, when the maximum number of empty line is reached in
read_request_line(), or that request line does not contains at least a method
and an (valid) URI, we can fail early and avoid some failure detected in
further processing.

Ensure that proto_num and protocol is set in another "error out early" edge
case. This can happen with invalid CONNECT requests as described in the PR.
PR: 58929

Borrow Yann's effort at cross-porting this to 2.2.x

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x-merge-http-strict@1775758 13f79535-47bb-0310-9956-ffa450edef68
CHANGES
include/httpd.h
server/protocol.c