]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r399388 from trunk:
authorRuediger Pluem <rpluem@apache.org>
Thu, 1 Jun 2006 20:03:53 +0000 (20:03 +0000)
committerRuediger Pluem <rpluem@apache.org>
Thu, 1 Jun 2006 20:03:53 +0000 (20:03 +0000)
* Add Content-Type to headers_out if not already set. This ensures that
  the Content-Type of the cached entity gets restored correctly.

PR: 39266

Submitted by: rpluem
Reviewed by: rpluem, trawick, jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@410932 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/cache/mod_mem_cache.c

diff --git a/CHANGES b/CHANGES
index 6d98d00862eb163c844593661e4f619262ff3f0a..35c6cdfb7810cb8031bfb11638b8a55f1f22fda5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.3
 
+  *) mod_mem_cache: Set content type correctly when delivering data from
+     cache. PR 39266. [Ruediger Pluem]
+
   *) mod_autoindex: Fix filename escaping with FancyIndexing disabled.
      PR 38910.  [Robby Griffin <rmg terc.edu>]
 
diff --git a/STATUS b/STATUS
index bf30e1566e39518d3006aea8322e53b9c8fa8b62..8f825f7ff558010c8a8b60d9dbce1e2579dfcf76 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -90,14 +90,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
       2.2.x (identical)
       +1: niq, trawick, rpluem
 
-    * mod_mem_cache: Add Content-Type to headers_out if not already set.
-      PR 39266.
-        Trunk version of patch:
-          http://svn.apache.org/viewcvs?rev=399388&view=rev
-        2.2.x version of patch:
-          Trunk version works
-      +1 rpluem, trawick, jim
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
 
     * Add optional 'scheme://' part to ServerName directive for cases
index 8a2e019464491fd53d8d77c5cb3a66dcffaab6db..555dbf9f3f7aea76cdf3ca9667259755e8b36137 100644 (file)
@@ -689,6 +689,14 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
     /* Precompute how much storage we need to hold the headers */
     headers_out = ap_cache_cacheable_hdrs_out(r->pool, r->headers_out,
                                               r->server);
+
+    /* If not set in headers_out, set Content-Type */
+    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));
+    }
+
     headers_out = apr_table_overlay(r->pool, headers_out, r->err_headers_out);
 
     rc = serialize_table(&mobj->header_out, &mobj->num_header_out,