summaryrefslogtreecommitdiff
path: root/lib/vquic
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2020-06-04 11:54:01 +0200
committerPeter Wu <peter@lekensteyn.nl>2020-06-04 22:07:56 +0200
commitceab0febd06e0dfe4f608bbe55242227a9c9d9c9 (patch)
treec114be6a487a4b84eebdbb1463e8e2a4e60d02fe /lib/vquic
parentc048dd0b7c83f9db08d7ad85522b629458e35dd6 (diff)
downloadcurl-ceab0febd06e0dfe4f608bbe55242227a9c9d9c9.tar.gz
quiche: advertise draft 28 support
Fix the verbose message while at it, quiche currently supports draft 27 and draft 28 simultaneously. Closes #5518
Diffstat (limited to 'lib/vquic')
-rw-r--r--lib/vquic/quiche.c16
1 files changed, 14 insertions, 2 deletions
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;
}