From: Graham Leggett Date: Wed, 13 Oct 2004 16:32:06 +0000 (+0000) Subject: Correctly store cache content type. X-Git-Tag: 2.0.53~226 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b9406057ec22a50cf6340f31539b7b3f39e2c46;p=thirdparty%2Fapache%2Fhttpd.git Correctly store cache content type. PR: 30278 Obtained from: Submitted by: [R��iger Pl�� ] Reviewed by: stoddard, jerenkrantz, minfrin, jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@105429 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 8ac88a34e93..6a17bb8e89c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.53 + *) mod_disk_cache: Correctly store cached content type. PR 30278. + [Rüiger Plü ] + *) mod_ldap: prevent the possiblity of an infinite loop in the LDAP statistics display. PR 29216 [Graham Leggett] diff --git a/STATUS b/STATUS index e6d4f1ca6c7..fdde6e56f5e 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2004/10/13 16:19:34 $] +Last modified at [$Date: 2004/10/13 16:32:05 $] Release: @@ -115,10 +115,6 @@ PATCHES TO BACKPORT FROM 2.1 jorton replies: it does indeed, hang on... +1: jorton - *) Correctly store cache content type. PR 30278 - modules/experimental/mod_disk_cache.c?r1=1.62&r2=1.63 - +1: stoddard, jerenkrantz, minfrin, jim - *) Do not store aborted content. PR 21492. modules/experimental/mod_disk_cache.c?r1=1.63&r2=1.64 +1: stoddard, jerenkrantz, minfrin, jim diff --git a/modules/experimental/mod_disk_cache.c b/modules/experimental/mod_disk_cache.c index c5bc592f3f9..7b753ee6d46 100644 --- a/modules/experimental/mod_disk_cache.c +++ b/modules/experimental/mod_disk_cache.c @@ -613,16 +613,17 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info headers_out = ap_cache_cacheable_hdrs_out(r->pool, r->headers_out); + 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)); + } + rv = store_table(dobj->hfd, headers_out); if (rv != APR_SUCCESS) { return rv; } - /* This case only occurs when the content is generated locally */ - if (!apr_table_get(r->headers_out, "Content-Type") && r->content_type) { - apr_table_setn(r->headers_out, "Content-Type", - ap_make_content_type(r, r->content_type)); - } } /* Parse the vary header and dump those fields from the headers_in. */