1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

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)) while(*p && ISBLANK(*p))
p++; p++;
protop = p; protop = p;
while(*p && ISALNUM(*p)) while(*p && !ISBLANK(*p) && (*p != ';') && (*p != '='))
p++; p++;
len = p - protop; len = p - protop;

View File

@ -16,7 +16,7 @@ Content-Length: 6
Connection: close Connection: close
Content-Type: text/html Content-Type: text/html
Funny-head: yesyes Funny-head: yesyes
Alt-Svc: h1="nowhere.foo:81" Alt-Svc: h1="nowhere.foo:81", un-kno22!wn=":82"
-foo- -foo-
</data> </data>