From c1dc4e61bd87abdfc120888e79c2da6bad8ce26b Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Mon, 10 Jun 2019 21:36:52 +0000 Subject: LLCache: validate max-age before use --- content/llcache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'content/llcache.c') 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); -- cgit v1.2.3