1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Factor check_head_for_refresh out of process_head

This commit is contained in:
Miciah Dashiel Butler Masters 2007-09-04 12:09:19 +00:00 committed by Laurent MONIN
parent 23262b3145
commit 4b297a5b03

View File

@ -377,13 +377,13 @@ search_for_url_param(unsigned char *str, unsigned char **ret)
#undef LWS #undef LWS
void static void
process_head(struct html_context *html_context, unsigned char *head) check_head_for_refresh(struct html_context *html_context, unsigned char *head)
{ {
unsigned char *refresh, *url; unsigned char *refresh, *url;
refresh = parse_header(head, "Refresh", NULL); refresh = parse_header(head, "Refresh", NULL);
if (refresh) { if (!refresh) return;
search_for_url_param(refresh, &url); search_for_url_param(refresh, &url);
if (!url) { if (!url) {
@ -442,6 +442,11 @@ process_head(struct html_context *html_context, unsigned char *head)
mem_free(refresh); 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")) { if (!get_opt_bool("document.cache.ignore_cache_control")) {
unsigned char *d; unsigned char *d;
int no_cache = 0; int no_cache = 0;