From: Greg Ames Date: Mon, 24 Jun 2002 17:06:19 +0000 (+0000) Subject: ap_discard_request_body: exit without reading the body if X-Git-Tag: 2.0.40~380 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a9d69a140a9a13aeba740e3e25e174a5bc24827;p=apache ap_discard_request_body: exit without reading the body if connection->keepalive is false. This works in conjunction with ap_die which resets connection->keepalive any time ap_status_drops_connection is true. The latter is explicity tested here in case ap_die isn't involved. Submitted by: Justin Erenkrantz, Greg Ames git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95882 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 48082def1a..5230772a1c 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -1882,7 +1882,8 @@ AP_DECLARE(int) ap_discard_request_body(request_rec *r) * * This function is also a no-op on a subrequest. */ - if (r->main || ap_status_drops_connection(r->status)) { + if (r->main || !r->connection->keepalive + || ap_status_drops_connection(r->status)) { return OK; }