]> granicus.if.org Git - apache/commitdiff
Fix timeout logging in ap_process_request().
authorYann Ylavic <ylavic@apache.org>
Mon, 12 Mar 2018 15:24:13 +0000 (15:24 +0000)
committerYann Ylavic <ylavic@apache.org>
Mon, 12 Mar 2018 15:24:13 +0000 (15:24 +0000)
We can't use 'r' after ap_process_request_after_handler(), the core output
filter might have cleaned up its deferred bucket brigade on error, including
the EOR bucket.

Reported by: steffenal
Fixes SpiderLabs/ModSecurity#1542

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

modules/http/http_request.c

index 986ac9d2785519852b42178354a24804c5807cc2..0b05b3d84215d4918d87f0c3ac8af94ea34d00cc 100644 (file)
@@ -499,13 +499,9 @@ AP_DECLARE(void) ap_process_request(request_rec *r)
              * Notice a timeout as an error message. This might be
              * valuable for detecting clients with broken network
              * connections or possible DoS attacks.
-             *
-             * It is still safe to use r / r->pool here as the eor bucket
-             * could not have been destroyed in the event of a timeout.
              */
-            ap_log_rerror(APLOG_MARK, APLOG_INFO, rv, r, APLOGNO(01581)
-                          "Timeout while writing data for URI %s to the"
-                          " client", r->unparsed_uri);
+            ap_log_cerror(APLOG_MARK, APLOG_INFO, rv, c, APLOGNO(01581)
+                          "flushing data to the client");
         }
     }
     if (ap_extended_status) {