From: Bill Stoddard Date: Wed, 11 Dec 2002 21:53:22 +0000 (+0000) Subject: Don't spend cycles finding cache-control until we actually need it. X-Git-Tag: pre_ajp_proxy~2451 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=67e1dd387d7d550858819126069495e5f18a561f;p=apache Don't spend cycles finding cache-control until we actually need it. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97871 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/experimental/mod_cache.c b/modules/experimental/mod_cache.c index 9a299bd29f..a10643d502 100644 --- a/modules/experimental/mod_cache.c +++ b/modules/experimental/mod_cache.c @@ -419,7 +419,7 @@ static int cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in) int rv; request_rec *r = f->r; char *url = r->unparsed_uri; - const char *cc_out = apr_table_get(r->headers_out, "Cache-Control"); + const char *cc_out; const char *exps, *lastmods, *dates, *etag; apr_time_t exp, date, lastmod, now; apr_off_t size; @@ -516,8 +516,9 @@ static int cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in) lastmod = APR_DATE_BAD; } - /* read the etag from the entity */ + /* read the etag and cache-control from the entity */ etag = apr_table_get(r->headers_out, "Etag"); + cc_out = apr_table_get(r->headers_out, "Cache-Control"); /* * what responses should we not cache?