diff options
author | John-Mark Bell <jmb@netsurf-browser.org> | 2019-06-10 21:36:52 +0000 |
---|---|---|
committer | John-Mark Bell <jmb@netsurf-browser.org> | 2019-06-10 21:36:52 +0000 |
commit | c1dc4e61bd87abdfc120888e79c2da6bad8ce26b (patch) | |
tree | 099a7e7eaf3f5227e35ed3da26459dce3c93b58a | |
parent | 23698aecf844c105b210fa42b642c1d0203978c9 (diff) | |
download | netsurf-c1dc4e61bd87abdfc120888e79c2da6bad8ce26b.tar.gz netsurf-c1dc4e61bd87abdfc120888e79c2da6bad8ce26b.tar.bz2 |
LLCache: validate max-age before use
-rw-r--r-- | content/llcache.c | 4 |
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); |