1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-17 06:55:02 -05:00

altsvc: with quiche, use the quiche h3 alpn string

Closes #4183
This commit is contained in:
Daniel Stenberg 2019-08-02 14:27:26 +02:00
parent 1132f43012
commit 0711153b46
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -56,8 +56,13 @@ static enum alpnid alpn2alpnid(char *name)
return ALPN_h2;
if(strcasecompare(name, "h2c"))
return ALPN_h2c;
#ifdef USE_QUICHE
if(strcasecompare(name, "h3-20"))
return ALPN_h3;
#else
if(strcasecompare(name, "h3"))
return ALPN_h3;
#endif
return ALPN_none; /* unknown, probably rubbish input */
}
@ -72,7 +77,11 @@ const char *Curl_alpnid2str(enum alpnid id)
case ALPN_h2c:
return "h2c";
case ALPN_h3:
#ifdef USE_QUICHE
return "h3-20";
#else
return "h3";
#endif
default:
return ""; /* bad */
}