From: Jim Jagielski Date: Wed, 28 Apr 2004 16:58:42 +0000 (+0000) Subject: handle error path where ap_set_keepalive() will set keepalive to 0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95d220054c71cb4c1a168784f54726c05d9787d2;p=thirdparty%2Fapache%2Fhttpd.git handle error path where ap_set_keepalive() will set keepalive to 0 to note a "to be closed" connection, and thus avoid reading in a body when not needed. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@103539 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/main/http_request.c b/src/main/http_request.c index ef4ed74a7e6..c1ccea74039 100644 --- a/src/main/http_request.c +++ b/src/main/http_request.c @@ -1056,7 +1056,7 @@ API_EXPORT(void) ap_die(int type, request_rec *r) */ if ((r->status != HTTP_NOT_MODIFIED) && (r->status != HTTP_NO_CONTENT) && !ap_status_drops_connection(r->status) - && r->connection && (r->connection->keepalive != -1)) { + && r->connection && (r->connection->keepalive > 0)) { (void) ap_discard_request_body(r); }