summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2019-06-10 21:58:46 +0100
committerVincent Sanders <vince@kyllikki.org>2019-06-10 21:58:46 +0100
commit9893b05b084980ff498eee6dd17853d8df807f27 (patch)
treeb6830e59a6b8bbdff6d4ac3bb176f20cc9a8bb94
parente598dcd139d8221f828d542ccf6f03466a5aecdc (diff)
downloadnetsurf-9893b05b084980ff498eee6dd17853d8df807f27.tar.gz
netsurf-9893b05b084980ff498eee6dd17853d8df807f27.tar.bz2
use jmb suggested fix to cache-control header parse error
-rw-r--r--content/llcache.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/content/llcache.c b/content/llcache.c
index c804b73a0..0bf3979a0 100644
--- a/content/llcache.c
+++ b/content/llcache.c
@@ -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);