aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/altsvc.c2
-rw-r--r--lib/vquic/quiche.c16
2 files changed, 15 insertions, 3 deletions
diff --git a/lib/altsvc.c b/lib/altsvc.c
index 371efa275..c9566c216 100644
--- a/lib/altsvc.c
+++ b/lib/altsvc.c
@@ -51,7 +51,7 @@
#define MAX_ALTSVC_ALPNLEN 10
#if defined(USE_QUICHE) && !defined(UNITTESTS)
-#define H3VERSION "h3-27"
+#define H3VERSION "h3-28"
#elif defined(USE_NGTCP2) && !defined(UNITTESTS)
#define H3VERSION "h3-28"
#else
diff --git a/lib/vquic/quiche.c b/lib/vquic/quiche.c
index f93e95ee1..436249522 100644
--- a/lib/vquic/quiche.c
+++ b/lib/vquic/quiche.c
@@ -234,8 +234,20 @@ CURLcode Curl_quic_connect(struct connectdata *conn, curl_socket_t sockfd,
/* for connection reuse purposes: */
conn->ssl[FIRSTSOCKET].state = ssl_connection_complete;
- infof(data, "Sent QUIC client Initial, ALPN: %s\n",
- QUICHE_H3_APPLICATION_PROTOCOL + 1);
+ {
+ unsigned char alpn_protocols[] = QUICHE_H3_APPLICATION_PROTOCOL;
+ unsigned alpn_len, offset = 0;
+
+ /* Replace each ALPN length prefix by a comma. */
+ while(offset < sizeof(alpn_protocols) - 1) {
+ alpn_len = alpn_protocols[offset];
+ alpn_protocols[offset] = ',';
+ offset += 1 + alpn_len;
+ }
+
+ infof(data, "Sent QUIC client Initial, ALPN: %s\n",
+ alpn_protocols + 1);
+ }
return CURLE_OK;
}