From deb74bd1bdf1cdbbb22ad2df02299e4e7bc51668 Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Tue, 4 Sep 2007 12:11:37 +0000 Subject: [PATCH] Factor check_head_for_cache_control out of process_head --- src/document/html/parser.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/document/html/parser.c b/src/document/html/parser.c index 7c4b203a..1bf2611c 100644 --- a/src/document/html/parser.c +++ b/src/document/html/parser.c @@ -442,12 +442,11 @@ check_head_for_refresh(struct html_context *html_context, unsigned char *head) mem_free(refresh); } -void -process_head(struct html_context *html_context, unsigned char *head) +static void +check_head_for_cache_control(struct html_context *html_context, + unsigned char *head) { - check_head_for_refresh(html_context, head); - - if (!get_opt_bool("document.cache.ignore_cache_control")) { + if (!get_opt_bool("document.cache.ignore_cache_control", NULL)) { unsigned char *d; int no_cache = 0; time_t expires = 0; @@ -510,6 +509,14 @@ process_head(struct html_context *html_context, unsigned char *head) } } +void +process_head(struct html_context *html_context, unsigned char *head) +{ + check_head_for_refresh(html_context, head); + + check_head_for_cache_control(html_context, head); +} +