httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stri...@apache.org
Subject svn commit: r157162 - in httpd/httpd/trunk/modules/cache: cache_storage.c mod_cache.c
Date Fri, 11 Mar 2005 21:39:48 GMT
Author: striker
Date: Fri Mar 11 13:39:45 2005
New Revision: 157162

URL: http://svn.apache.org/viewcvs?view=rev&rev=157162
Log:
Another mod_cache fixlet.

* modules/cache/mod_cache.c

  (cache_url_handler): Add more debug output.  Restore original request
   headers when CACHE_SAVE filter isn't added to fix up after the request.


* modules/cache/cache_storage.c

  (cache_select_url): Add more debug output.

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

Modified: httpd/httpd/trunk/modules/cache/cache_storage.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/cache/cache_storage.c?view=diff&r1=157161&r2=157162
==============================================================================
--- httpd/httpd/trunk/modules/cache/cache_storage.c (original)
+++ httpd/httpd/trunk/modules/cache/cache_storage.c Fri Mar 11 13:39:45 2005
@@ -255,6 +255,10 @@
             if (!fresh) {
                 const char *etag, *lastmod;
 
+                ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r->server,
+                  "Cached response for %s isn't fresh.  Adding/replacing "
+                  "conditional request headers.", r->uri);
+
                 /* Make response into a conditional */
                 cache->stale_headers = apr_table_copy(r->pool,
                                                       r->headers_in);

Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/cache/mod_cache.c?view=diff&r1=157161&r2=157162
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Fri Mar 11 13:39:45 2005
@@ -117,9 +117,18 @@
     if (rv != OK) {
         if (rv == DECLINED) {
             if (!lookup) {
+                ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r->server,
+                  "Adding CACHE_SAVE filter.");
+
                 /* add cache_save filter to cache this request */
                 ap_add_output_filter_handle(cache_save_filter_handle, NULL, r,
                                             r->connection);
+            }
+            else if (cache->stale_headers) {
+                ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r->server,
+                  "Restoring request headers.");
+
+                r->headers_in = cache->stale_headers;
             }
         }
         else {



Mime
View raw message