aboutsummaryrefslogtreecommitdiff
path: root/lib/altsvc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/altsvc.c')
-rw-r--r--lib/altsvc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/altsvc.c b/lib/altsvc.c
index f6c5c0612..bb72a33a4 100644
--- a/lib/altsvc.c
+++ b/lib/altsvc.c
@@ -431,6 +431,8 @@ static time_t debugtime(void *unused)
#define time(x) debugtime(x)
#endif
+#define ISNEWLINE(x) (((x) == '\n') || (x) == '\r')
+
/*
* Curl_altsvc_parse() takes an incoming alt-svc response header and stores
* the data correctly in the cache.
@@ -520,12 +522,12 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data,
/* Handle the optional 'ma' and 'persist' flags. Unknown flags
are skipped. */
for(;;) {
- while(*p && ISBLANK(*p) && *p != ';' && *p != ',')
+ while(ISBLANK(*p))
p++;
- if(!*p || *p == ',')
+ if(*p != ';')
break;
p++; /* pass the semicolon */
- if(!*p)
+ if(!*p || ISNEWLINE(*p))
break;
result = getalnum(&p, option, sizeof(option));
if(result) {