]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_disk_cache: Correctly store cached content type.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 28 Sep 2004 16:17:38 +0000 (16:17 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 28 Sep 2004 16:17:38 +0000 (16:17 +0000)
PR: 30278
Submitted by: R�diger Pl�m <r.pluem t-online.de>
Reviewed by: Justin Erenkrantz

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105315 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/experimental/mod_disk_cache.c

diff --git a/CHANGES b/CHANGES
index 3502013c4ccf90a64c737009d863718f9c0b90d0..c67582a89ab944c2cba609ed841c682b9ec4680d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) mod_disk_cache: Correctly store cached content type.  PR 30278.
+     [Rüdiger Plüm <r.pluem t-online.de>]
+
   *) Fix a segfault in the LDAP cache purge. [Jess Holle <jessh ptc.com>]
 
   *) mod_rewrite: Handle per-location rules when r->filename is unset.
index 6e00c0dfecb70478f2fdb67e2fed5f93449a707a..0c9ccd3540bd4e76afb802b51f7e818e995969cd 100644 (file)
@@ -613,16 +613,17 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
 
             headers_out = ap_cache_cacheable_hdrs_out(r->pool, r->headers_out);
 
+            if (!apr_table_get(headers_out, "Content-Type") &&
+                r->content_type) {
+                apr_table_setn(headers_out, "Content-Type",
+                               ap_make_content_type(r, r->content_type));
+            }
+
             rv = store_table(dobj->hfd, headers_out);
             if (rv != APR_SUCCESS) {
                 return rv;
             }
 
-            /* This case only occurs when the content is generated locally */
-            if (!apr_table_get(r->headers_out, "Content-Type") && r->content_type) {
-                apr_table_setn(r->headers_out, "Content-Type",
-                               ap_make_content_type(r, r->content_type));
-            }
         }
 
         /* Parse the vary header and dump those fields from the headers_in. */