From: Ruediger Pluem Date: Mon, 15 Oct 2018 19:25:20 +0000 (+0000) Subject: * Ensure that aborted connections are logged as such. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e931d1d71ddfb40a0eb81601d8884d220663a46c;p=apache * Ensure that aborted connections are logged as such. Set c->aborted before apr_brigade_cleanup to have the correct status when logging the request as apr_brigade_cleanup triggers the logging of the request if it contains an EOR bucket. PR: 62823 Submitted by: Arnaud Grandville Reviewed by:rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1843939 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index ec01e04e0c..045c767eb1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.1 + *) core: Ensure that aborted connections are logged as such. PR 62823 + [Arnaud Grandville ] + *) mpm_event: Stop issuing AH00484 "server reached MaxRequestWorkers..." when there are still idle threads available. When there are less idle threads than MinSpareThreads, issue new one-time message AH10159. Matches worker MPM. diff --git a/server/core_filters.c b/server/core_filters.c index 751cb2581a..51a17a6be7 100644 --- a/server/core_filters.c +++ b/server/core_filters.c @@ -436,8 +436,13 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *bb) ap_log_cerror( APLOG_MARK, APLOG_TRACE1, rv, c, "core_output_filter: writing data to the network"); - apr_brigade_cleanup(bb); + /* + * Set c->aborted before apr_brigade_cleanup to have the correct status + * when logging the request as apr_brigade_cleanup triggers the logging + * of the request if it contains an EOR bucket. + */ c->aborted = 1; + apr_brigade_cleanup(bb); return rv; }