httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1439113 - in /httpd/httpd/branches/2.4.x: ./ STATUS modules/cache/mod_cache.c
Date Sun, 27 Jan 2013 16:32:00 GMT
Author: rjung
Date: Sun Jan 27 16:32:00 2013
New Revision: 1439113

URL: http://svn.apache.org/viewvc?rev=1439113&view=rev
Log:
mod_cache does no longer send Content-Type header
for fresh content.

Followup to trunk r1361153+r1373447 resp. 2.4.x
r1373115+r1393191 (PR 53539, wrong Content-Type
for stale content).

Backport of r1439083 from trunk.

No CHANGES needed, because problem was introduced
after 2.4.3.

Submitted by: rjung
Backported by: rjung
Reviewed by: rjung, covener, minfrin

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/cache/mod_cache.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1439083

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1439113&r1=1439112&r2=1439113&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Sun Jan 27 16:32:00 2013
@@ -100,7 +100,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
                http://mail-archives.apache.org/mod_mbox/httpd-dev/201301.mbox/%3C20130103112044.GA19653%40redhat.com%3E
         kbrand: configure option added in r1429228
 
-
    * mod_status: Add useful mod_status info... try to determine last time
      a specific vhost was accessed/used.
      trunk patch: https://svn.apache.org/viewvc?view=revision&revision=1417529
@@ -137,19 +136,12 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
     2.4.x patch: http://people.apache.org/~jailletc36/backport4.patch
     +1: jailletc36, rjung, covener
 
-
   * Speed-up 'ap_fputs'. This change is just the inline version of what is remaining
     in apr_brigade_puts() after http://svn.apache.org/viewvc?view=revision&revision=1402870
     trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1409437
     2.4.x patch: trunk patches works
     +1: jailletc36, rjung, covener
 
-  * mod_cache: Cache does no longer send Content-Type header for fresh content.
-    Followup to r1361153+r1373447 (PR 53539, wrong Content-Type for stale content).
-    trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1439083
-    2.4.x patch: trunk patches works
-    +1: rjung, covener, minfrin
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]

Modified: httpd/httpd/branches/2.4.x/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/cache/mod_cache.c?rev=1439113&r1=1439112&r2=1439113&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/cache/mod_cache.c (original)
+++ httpd/httpd/branches/2.4.x/modules/cache/mod_cache.c Sun Jan 27 16:32:00 2013
@@ -573,9 +573,12 @@ static apr_status_t cache_out_filter(ap_
             apr_bucket_brigade *bb = apr_brigade_create(r->pool,
                     r->connection->bucket_alloc);
 
-            /* restore content type of cached response */
-            ap_set_content_type(r, apr_table_get(cache->handle->resp_hdrs,
-                                                 "Content-Type"));
+            /* restore content type of cached response if available */
+            /* Needed especially when stale content gets served. */
+            const char *ct = apr_table_get(cache->handle->resp_hdrs, "Content-Type");
+            if (ct) {
+                ap_set_content_type(r, ct);
+            }
 
             /* restore status of cached response */
             r->status = cache->handle->cache_obj->info.status;



Mime
View raw message