httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r410370 - in /httpd/httpd/trunk: CHANGES modules/cache/cache_storage.c
Date Tue, 30 May 2006 20:48:09 GMT
Author: rpluem
Date: Tue May 30 13:48:09 2006
New Revision: 410370

URL: http://svn.apache.org/viewvc?rev=410370&view=rev
Log:
* Keep the Content-Type for successfully revalidated
  cached objects, by unsetting possible Content-Type headers in
  r->headers_out and r->err_headers_out as they may be different to what
  we have received from the cache.
  Actually they are not needed as r->content_type set by
  ap_set_content_type a few lines above will be used in the store_headers
  functions of the storage providers as a fallback and the HTTP_HEADER filter
  does overwrite the Content-Type header with r->content_type anyway.

PR: 39647

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

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=410370&r1=410369&r2=410370&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue May 30 13:48:09 2006
@@ -2,6 +2,9 @@
 Changes with Apache 2.3.0
   [Remove entries to the current 2.0 and 2.2 section below, when backported]
 
+  *) mod_cache: Do not overwrite the Content-Type in the cache, for
+     successfully revalidated cached objects. PR 39647. [Ruediger Pluem]
+
   *) mod_disk_cache: Delete temporary files if they cannot be renamed to their
      final name. [Davi Arnaut <davi haxent.com.br>]
 

Modified: httpd/httpd/trunk/modules/cache/cache_storage.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_storage.c?rev=410370&r1=410369&r2=410370&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/cache_storage.c (original)
+++ httpd/httpd/trunk/modules/cache/cache_storage.c Tue May 30 13:48:09 2006
@@ -118,6 +118,17 @@
     if (v) {
         ap_set_content_type(r, v);
         apr_table_unset(h->resp_hdrs, "Content-Type");
+        /*
+         * Also unset possible Content-Type headers in r->headers_out and
+         * r->err_headers_out as they may be different to what we have received
+         * from the cache.
+         * Actually they are not needed as r->content_type set by
+         * ap_set_content_type above will be used in the store_headers functions
+         * of the storage providers as a fallback and the HTTP_HEADER filter
+         * does overwrite the Content-Type header with r->content_type anyway.
+         */
+        apr_table_unset(r->headers_out, "Content-Type");
+        apr_table_unset(r->err_headers_out, "Content-Type");
     }
 
     /* If the cache gave us a Last-Modified header, we can't just



Mime
View raw message