You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2006/05/03 21:34:38 UTC
svn commit: r399388 - in /httpd/httpd/trunk: CHANGES
modules/cache/mod_mem_cache.c
Author: rpluem
Date: Wed May 3 12:34:35 2006
New Revision: 399388
URL: http://svn.apache.org/viewcvs?rev=399388&view=rev
Log:
* 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
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/cache/mod_mem_cache.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/CHANGES?rev=399388&r1=399387&r2=399388&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed May 3 12:34:35 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_mem_cache: Set content type correctly when delivering data from
+ cache. PR 39266. [Ruediger Pluem]
+
*) worker and event MPMs: fix excessive forking if fork() or child_init
take a long time. PR 39275.
[Greg Ames, Jeff Trawick, Chris Darroch <chrisd pearsoncmg.com> ]
Modified: httpd/httpd/trunk/modules/cache/mod_mem_cache.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/cache/mod_mem_cache.c?rev=399388&r1=399387&r2=399388&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_mem_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_mem_cache.c Wed May 3 12:34:35 2006
@@ -690,6 +690,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,