]> granicus.if.org Git - apache/commitdiff
Fix a timed out connection going into the keep-alive state after a timeout
authorStefan Fritsch <sf@apache.org>
Sat, 14 May 2011 20:25:55 +0000 (20:25 +0000)
committerStefan Fritsch <sf@apache.org>
Sat, 14 May 2011 20:25:55 +0000 (20:25 +0000)
when discarding a request body.

PR: 51103

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1103213 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/filters/mod_reqtimeout.c

diff --git a/CHANGES b/CHANGES
index e5bba159d76f013133a127a250ec6f13bfcb0da0..29cc6cb132c992c475c2d7967b03b5eb5b2cb7f8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 
 Changes with Apache 2.3.13
 
+  *) mod_reqtimeout: Fix a timed out connection going into the keep-alive
+     state after a timeout when discarding a request body. PR 51103.
+     [Stefan Fritsch]
+
   *) core: Add various file existance test operators to ap_expr.
      [Stefan Fritsch]
 
index adc4defc2c5de68f6cef6664275e7109566f02c4..804e7ad68c13ac14dab5554fabb861dc2dcf69e7 100644 (file)
@@ -306,6 +306,13 @@ out:
          * 2s (SECONDS_TO_LINGER).
          */
         apr_table_setn(f->c->notes, "short-lingering-close", "1");
+
+        /*
+         * Also, we must not allow keep-alive requests, as
+         * ap_finalize_protocol() may ignore our error status (if the timeout
+         * happened on a request body that is discarded).
+         */
+        f->c->keepalive = AP_CONN_CLOSE;
     }
     return rv;
 }