httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1003913 - /httpd/httpd/trunk/modules/cache/mod_cache.c
Date Sat, 02 Oct 2010 23:17:47 GMT
Author: minfrin
Date: Sat Oct  2 23:17:47 2010
New Revision: 1003913

URL: http://svn.apache.org/viewvc?rev=1003913&view=rev
Log:
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.

Modified:
    httpd/httpd/trunk/modules/cache/mod_cache.c

Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=1003913&r1=1003912&r2=1003913&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Sat Oct  2 23:17:47 2010
@@ -275,10 +275,11 @@ static int cache_quick_handler(request_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_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;
     }



Mime
View raw message