]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Fix the case where if there is no ErrorDocument specified for an error,
authorJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 31 May 2002 07:19:04 +0000 (07:19 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 31 May 2002 07:19:04 +0000 (07:19 +0000)
commit305c215b7618a13eb1b86ed99ea37f6fce25b906
tree15ad13c8f7cae4ddf126186930001ae3e4a0fcc7
parent4b17607d3eda1561732a10b2fefb79f91872da2c
Fix the case where if there is no ErrorDocument specified for an error,
the error would be sent to the client *twice* because both the filter
and the core would trigger error responses.

The problem is that the filters have already handled some errors (say 413)
and due to the ap_get_client_block API, the error was morphed into 400.
Therefore, ap_discard_request_body must use brigades directly rather than
the ap_get_client_block API so that any potential errors are not dropped.

The special value AP_FILTER_ERROR indicates that the lower level has
already dealt with this problem (ap_die() will realize this).  Otherwise,
we'll error with HTTP_BAD_REQUEST and ap_die() will take it from there.

This also prevents needless memory copies when we are just going to
discard it anyway.

Thanks to Cliff Woolley who found this wacky problem.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95424 13f79535-47bb-0310-9956-ffa450edef68
modules/http/http_protocol.c