cached objects, by unsetting possible Content-Type headers in
r->headers_out and r->err_headers_out as they may be different to what
we have received from the cache.
Actually they are not needed as r->content_type set by
ap_set_content_type a few lines above will be used in the store_headers
functions of the storage providers as a fallback and the HTTP_HEADER filter
does overwrite the Content-Type header with r->content_type anyway.
PR: 39647
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@410370
13f79535-47bb-0310-9956-
ffa450edef68
Changes with Apache 2.3.0
[Remove entries to the current 2.0 and 2.2 section below, when backported]
+ *) mod_cache: Do not overwrite the Content-Type in the cache, for
+ successfully revalidated cached objects. PR 39647. [Ruediger Pluem]
+
*) mod_disk_cache: Delete temporary files if they cannot be renamed to their
final name. [Davi Arnaut <davi haxent.com.br>]
if (v) {
ap_set_content_type(r, v);
apr_table_unset(h->resp_hdrs, "Content-Type");
+ /*
+ * Also unset possible Content-Type headers in r->headers_out and
+ * r->err_headers_out as they may be different to what we have received
+ * from the cache.
+ * Actually they are not needed as r->content_type set by
+ * ap_set_content_type above will be used in the store_headers functions
+ * of the storage providers as a fallback and the HTTP_HEADER filter
+ * does overwrite the Content-Type header with r->content_type anyway.
+ */
+ apr_table_unset(r->headers_out, "Content-Type");
+ apr_table_unset(r->err_headers_out, "Content-Type");
}
/* If the cache gave us a Last-Modified header, we can't just