Commit 1e02931a authored by Graham Leggett's avatar Graham Leggett
Browse files

Correctly store cache content type.

PR:	30278
Obtained from:
Submitted by:	[R��iger Pl�� <r.pluem t-online.de>]
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
parent 2e97dbf3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
Changes with Apache 2.0.53
  *) mod_disk_cache: Correctly store cached content type.  PR 30278.
     [Rüiger Plü <r.pluem t-online.de>]
  *) mod_ldap: prevent the possiblity of an infinite loop in the LDAP
     statistics display. PR 29216 [Graham Leggett]
+1 −5
Original line number Diff line number Diff line
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
+6 −5
Original line number Diff line number Diff line
@@ -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. */