use jmb suggested fix to cache-control header parse error

This commit is contained in:
Vincent Sanders 2019-06-10 21:58:46 +01:00
parent e598dcd139
commit 9893b05b08
1 changed files with 6 additions and 7 deletions

View File

@ -608,16 +608,15 @@ llcache_fetch_parse_cache_control(llcache_object *object, char *value)
start++;
}
if (start < comma) {
/* Skip over '=' */
start++;
}
/* Skip over '=' */
start++;
#define SKIP_ST(p) while (*p != '\0' && (*p == ' ' || *p == '\t')) p++
/* Skip whitespace */
SKIP_ST(start);
if (start < comma) {
/* Skip whitespace */
SKIP_ST(start);
}
if (start < comma) {
object->cache.max_age = atoi(start);