From: Graham Leggett Date: Sat, 2 Oct 2010 23:17:47 +0000 (+0000) Subject: Realign the cache_quick_handler() and cache_handler() to behave identically X-Git-Tag: 2.3.9~364 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b9ba2169a93359036299fcd0274294e85b937d9a;p=apache Realign the cache_quick_handler() and cache_handler() to behave identically to the default_handler() when it comes to reacting to errors when writing to the filter stack. Previously the error message implied the cache had failed, when in reality, any part of the filter stack may have returned an error. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1003913 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index d0e915d50c..460887e895 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -275,10 +275,11 @@ static int cache_quick_handler(request_rec *r, int lookup) rv = ap_pass_brigade(r->output_filters, out); if (rv != APR_SUCCESS) { if (rv != AP_FILTER_ERROR) { - ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server, - "cache: error returned while trying to return %s " - "cached data", - cache->provider_name); + /* no way to know what type of error occurred */ + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, + "cache_quick_handler(%s): ap_pass_brigade returned %i", + cache->provider_name, rv); + return HTTP_INTERNAL_SERVER_ERROR; } return rv; } @@ -518,10 +519,11 @@ static int cache_handler(request_rec *r) rv = ap_pass_brigade(r->output_filters, out); if (rv != APR_SUCCESS) { if (rv != AP_FILTER_ERROR) { - ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server, - "cache: error returned while trying to return %s " - "cached data", - cache->provider_name); + /* no way to know what type of error occurred */ + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, + "cache_handler(%s): ap_pass_brigade returned %i", + cache->provider_name, rv); + return HTTP_INTERNAL_SERVER_ERROR; } return rv; }