mirror of
https://github.com/apache/httpd.git
synced 2025-11-15 12:41:11 +03:00
mod_cache: follow up to r1594643.
Avoid table lookup if not necessary (fast path first). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1594648 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
8
modules/cache/cache_util.c
vendored
8
modules/cache/cache_util.c
vendored
@@ -1256,14 +1256,14 @@ apr_table_t *cache_merge_headers_out(request_rec *r)
|
||||
r->err_headers_out);
|
||||
apr_table_clear(r->err_headers_out);
|
||||
|
||||
if (!apr_table_get(headers_out, "Content-Type")
|
||||
&& r->content_type) {
|
||||
if (r->content_type
|
||||
&& !apr_table_get(headers_out, "Content-Type")) {
|
||||
apr_table_setn(headers_out, "Content-Type",
|
||||
ap_make_content_type(r, r->content_type));
|
||||
}
|
||||
|
||||
if (!apr_table_get(headers_out, "Content-Encoding")
|
||||
&& r->content_encoding) {
|
||||
if (r->content_encoding
|
||||
&& !apr_table_get(headers_out, "Content-Encoding")) {
|
||||
apr_table_setn(headers_out, "Content-Encoding",
|
||||
r->content_encoding);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user