diff --git a/src/document/html/parser.c b/src/document/html/parser.c index 22103eb25..7c4b203a2 100644 --- a/src/document/html/parser.c +++ b/src/document/html/parser.c @@ -377,13 +377,13 @@ search_for_url_param(unsigned char *str, unsigned char **ret) #undef LWS -void -process_head(struct html_context *html_context, unsigned char *head) +static void +check_head_for_refresh(struct html_context *html_context, unsigned char *head) { unsigned char *refresh, *url; refresh = parse_header(head, "Refresh", NULL); - if (refresh) { + if (!refresh) return; search_for_url_param(refresh, &url); if (!url) { @@ -440,7 +440,12 @@ process_head(struct html_context *html_context, unsigned char *head) } mem_free(refresh); - } +} + +void +process_head(struct html_context *html_context, unsigned char *head) +{ + check_head_for_refresh(html_context, head); if (!get_opt_bool("document.cache.ignore_cache_control")) { unsigned char *d;