From: Stefan Fritsch Date: Sat, 14 May 2011 20:25:55 +0000 (+0000) Subject: Fix a timed out connection going into the keep-alive state after a timeout X-Git-Tag: 2.3.13~136 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=89137ad2b75a9f1fb6d2d7a72bb51695ab2507cf;p=apache Fix a timed out connection going into the keep-alive state after a timeout 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 --- diff --git a/CHANGES b/CHANGES index e5bba159d7..29cc6cb132 100644 --- 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] diff --git a/modules/filters/mod_reqtimeout.c b/modules/filters/mod_reqtimeout.c index adc4defc2c..804e7ad68c 100644 --- a/modules/filters/mod_reqtimeout.c +++ b/modules/filters/mod_reqtimeout.c @@ -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; }