]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
core: follow up to r1876664: allow ErrorDocument to read body when applicable
authorYann Ylavic <ylavic@apache.org>
Tue, 21 Apr 2020 10:29:07 +0000 (10:29 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 21 Apr 2020 10:29:07 +0000 (10:29 +0000)
commitac762c1ae12b6620d6c7212f40b2d46e031d8d6c
tree6922ae4b6f5ccf8cd01ddb4b911280d33342bab6
parent3fce584ad134fd80d30e8a5bacc0076be119dece
core: follow up to r1876664: allow ErrorDocument to read body when applicable

Unless ap_read_request() failed to read the request line or header, or
Transfer-Encoding is invalid, we can still provide the request body to custom
error handlers (ErrorDocument) that ask it (e.g. internal redirects to CGI).

So this commit splits early failure path (previously die_early label) in two,
die_unusable_input and die_before_hooks, where the latter preserves input
filters (including HTTP_IN).

Also, the code to apply the connection timeout and r->per_dir_config from the
server is now in a new apply_server_config() helper since it's used multiple
times. Note that apr_socket_timeout_set() is a noop if the new timeout is the
same as the one already in place, so there is no need to cache the old timeout
nor use apr_socket_timeout_get(). Likewise, r->server is initially set to
c->base_server so apply_server_config() is overall a noop when no change is
needed.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876784 13f79535-47bb-0310-9956-ffa450edef68
modules/http2/h2_request.c
server/protocol.c