summaryrefslogtreecommitdiff
path: root/content/llcache.c
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2019-06-10 21:36:52 +0000
committerJohn-Mark Bell <jmb@netsurf-browser.org>2019-06-10 21:36:52 +0000
commitc1dc4e61bd87abdfc120888e79c2da6bad8ce26b (patch)
tree099a7e7eaf3f5227e35ed3da26459dce3c93b58a /content/llcache.c
parent23698aecf844c105b210fa42b642c1d0203978c9 (diff)
downloadnetsurf-c1dc4e61bd87abdfc120888e79c2da6bad8ce26b.tar.gz
netsurf-c1dc4e61bd87abdfc120888e79c2da6bad8ce26b.tar.bz2
LLCache: validate max-age before use
Diffstat (limited to 'content/llcache.c')
-rw-r--r--content/llcache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/content/llcache.c b/content/llcache.c
index d78d5bb62..58ac00a7c 100644
--- a/content/llcache.c
+++ b/content/llcache.c
@@ -602,7 +602,9 @@ llcache_fetch_parse_cache_control(llcache_object *object, char *value)
object->cache.no_cache = LLCACHE_VALIDATE_ALWAYS;
}
- object->cache.max_age = http_cache_control_max_age(cc);
+ if (http_cache_control_has_max_age(cc)) {
+ object->cache.max_age = http_cache_control_max_age(cc);
+ }
http_cache_control_destroy(cc);