]> granicus.if.org Git - apache/commitdiff
ap_discard_request_body: exit without reading the body if
authorGreg Ames <gregames@apache.org>
Mon, 24 Jun 2002 17:06:19 +0000 (17:06 +0000)
committerGreg Ames <gregames@apache.org>
Mon, 24 Jun 2002 17:06:19 +0000 (17:06 +0000)
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

modules/http/http_protocol.c

index 48082def1afa3a0198d063fd3e0536deb80d36f1..5230772a1cd1311cd771571a51fb6f1ab0f31522 100644 (file)
@@ -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;
     }