1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-14 01:22:37 +03:00

Cache does no longer send Content-Type header

for fresh content.

Followup to r1361153+r1373447 (PR 53539, wrong
Content-Type for stale content).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1439083 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Rainer Jung
2013-01-27 13:49:17 +00:00
parent 62980ad902
commit dba4500a80

View File

@@ -604,9 +604,12 @@ static apr_status_t cache_out_filter(ap_filter_t *f, apr_bucket_brigade *in)
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;