]> granicus.if.org Git - curl/commitdiff
altsvc: with quiche, use the quiche h3 alpn string
authorDaniel Stenberg <daniel@haxx.se>
Fri, 2 Aug 2019 12:27:26 +0000 (14:27 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 3 Aug 2019 19:55:41 +0000 (21:55 +0200)
Closes #4183

lib/altsvc.c

index e4d3ea60568b23effabf8a53da20585e2015eaa1..0e947199937084b7f53636c71e20b79d3a5216d9 100644 (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 */
   }