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:
parent
2d0180d1e7
commit
fc12376bf5
@ -296,13 +296,13 @@ parse_old_meta_refresh(unsigned char *str, unsigned char **ret)
|
|||||||
if (len) *ret = memacpy(p, len);
|
if (len) *ret = memacpy(p, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
parse_header_param(refresh, "URL", &url);
|
parse_header_param(refresh, "URL", &url);
|
||||||
if (!url) {
|
if (!url) {
|
||||||
@ -359,7 +359,12 @@ 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", NULL)) {
|
if (!get_opt_bool("document.cache.ignore_cache_control", NULL)) {
|
||||||
unsigned char *d;
|
unsigned char *d;
|
||||||
|
Loading…
Reference in New Issue
Block a user