httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r410932 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/cache/mod_mem_cache.c
Date Thu, 01 Jun 2006 20:03:53 GMT
Author: rpluem
Date: Thu Jun  1 13:03:53 2006
New Revision: 410932

URL: http://svn.apache.org/viewvc?rev=410932&view=rev
Log:
Merge r399388 from trunk:

* 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

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=410932&r1=410931&r2=410932&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu Jun  1 13:03:53 2006
@@ -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>]
 

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=410932&r1=410931&r2=410932&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Thu Jun  1 13:03:53 2006
@@ -90,14 +90,6 @@
       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

Modified: httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c?rev=410932&r1=410931&r2=410932&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c (original)
+++ httpd/httpd/branches/2.2.x/modules/cache/mod_mem_cache.c Thu Jun  1 13:03:53 2006
@@ -689,6 +689,14 @@
     /* 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,



Mime
View raw message