From: Ryan Bloom Date: Fri, 22 Mar 2002 21:45:44 +0000 (+0000) Subject: We have to return valid HTTP status codes from filters. This fixes two X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b9eec3ef78ef59638cb2af4bd49a0d3f7742766;p=apache We have to return valid HTTP status codes from filters. This fixes two 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94143 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core.c b/server/core.c index 863b571b58..99cc8d8900 100644 --- a/server/core.c +++ b/server/core.c @@ -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;