* server/core_filters.c (ap_core_output_filter): Fail quickly with
authorJoe Orton <jorton@apache.org>
Fri, 23 Mar 2007 11:46:10 +0000 (11:46 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 23 Mar 2007 11:46:10 +0000 (11:46 +0000)
APR_ECONNABORTED if the c->aborted flag is already set.

PR: 39605

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

server/core_filters.c

index 551b69a2fe0cc1cec89410888b443c6178d4f1cb..f06b976cd187ecbb87a7722bdb915a60b6f35c7a 100644 (file)
@@ -352,6 +352,12 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb)
     apr_bucket *bucket, *next;
     apr_size_t bytes_in_brigade, non_file_bytes_in_brigade;
 
+    /* Fail quickly if the connection has already been aborted. */
+    if (c->aborted) {
+        apr_brigade_cleanup(new_bb);
+        return APR_ECONNABORTED;
+    }
+
     if (ctx == NULL) {
         apr_status_t rv;
         ctx = apr_pcalloc(c->pool, sizeof(*ctx));