summaryrefslogtreecommitdiffstats
path: root/modules/cache
diff options
context:
space:
mode:
authorGraham Leggett <minfrin@apache.org>2010-10-03 01:17:47 +0200
committerGraham Leggett <minfrin@apache.org>2010-10-03 01:17:47 +0200
commitb9ba2169a93359036299fcd0274294e85b937d9a (patch)
treeb795e9c1eab0c72638da353b1ae216d4065c03a8 /modules/cache
parentRemove FIXMEs, they have been fixed. (diff)
downloadapache2-b9ba2169a93359036299fcd0274294e85b937d9a.tar.xz
apache2-b9ba2169a93359036299fcd0274294e85b937d9a.zip
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
Diffstat (limited to 'modules/cache')
-rw-r--r--modules/cache/mod_cache.c18
1 files changed, 10 insertions, 8 deletions
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;
}