]> granicus.if.org Git - apache/commitdiff
We have to return valid HTTP status codes from filters. This fixes two
authorRyan Bloom <rbb@apache.org>
Fri, 22 Mar 2002 21:45:44 +0000 (21:45 +0000)
committerRyan Bloom <rbb@apache.org>
Fri, 22 Mar 2002 21:45:44 +0000 (21:45 +0000)
cases in the core_output_filters where there was a problem, and the core
returned an error code instead of an HTTP status code.  This keeps us from
putting status codes like 32 and 104 in the access log.

Submitted by: Ryan Morgan <rmorgan@covalent.net>

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

server/core.c

index 863b571b580fa393dcc434af1a08adccbc4bf542..99cc8d89005613024de9cf1b8d3cdd9396167741 100644 (file)
@@ -3744,7 +3744,7 @@ static apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b)
                     if (rv != APR_SUCCESS) {
                         ap_log_error(APLOG_MARK, APLOG_ERR, rv, c->base_server,
                                      "core_output_filter: Error reading from bucket.");
-                        return rv;
+                        return HTTP_INTERNAL_SERVER_ERROR;
                     }
 
                     apr_brigade_write(ctx->b, NULL, NULL, str, n);
@@ -3829,7 +3829,11 @@ static apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b)
                 c->aborted = 1;
             }
 
-            return rv;
+            /* The client has aborted, but the request was successful. We
+             * will report success, and leave it to the access and error
+             * logs to note that the connection was aborted.
+             */
+            return APR_SUCCESS;
         }
 
         b = more;