alt-svc: more liberal ALPN name parsing

Allow pretty much anything to be part of the ALPN identifier. In
particular minus, which is used for "h3-20" (in-progress HTTP/3
versions) etc.

Updated test 356.
Closes #4182
This commit is contained in:
Daniel Stenberg 2019-08-02 13:46:49 +02:00
parent decefd5778
commit 1132f43012
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 2 additions and 2 deletions

View file

@ -343,7 +343,7 @@ static CURLcode getalnum(const char **ptr, char *alpnbuf, size_t buflen)
while(*p && ISBLANK(*p))
p++;
protop = p;
while(*p && ISALNUM(*p))
while(*p && !ISBLANK(*p) && (*p != ';') && (*p != '='))
p++;
len = p - protop;