aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/libcurl/symbols-in-versions1
-rw-r--r--include/curl/curl.h4
-rw-r--r--lib/getinfo.c3
-rw-r--r--lib/url.c2
4 files changed, 8 insertions, 2 deletions
diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions
index 1afe73b53..49175e0f5 100644
--- a/docs/libcurl/symbols-in-versions
+++ b/docs/libcurl/symbols-in-versions
@@ -834,6 +834,7 @@ CURL_HTTP_VERSION_2 7.43.0
CURL_HTTP_VERSION_2TLS 7.47.0
CURL_HTTP_VERSION_2_0 7.33.0
CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 7.49.0
+CURL_HTTP_VERSION_3 7.66.0
CURL_HTTP_VERSION_NONE 7.9.1
CURL_IPRESOLVE_V4 7.10.8
CURL_IPRESOLVE_V6 7.10.8
diff --git a/include/curl/curl.h b/include/curl/curl.h
index 33aa047a7..6011e416f 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -1985,7 +1985,9 @@ enum {
CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */
CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1
Upgrade */
-
+ CURL_HTTP_VERSION_3 = 30, /* This cannot be set with CURLOPT_HTTP_VERSION,
+ use CURLOPT_H3 and/or CURLOPT_ALTSVC to enable
+ HTTP/3 */
CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
};
diff --git a/lib/getinfo.c b/lib/getinfo.c
index e118da80d..5fd8dc018 100644
--- a/lib/getinfo.c
+++ b/lib/getinfo.c
@@ -235,6 +235,9 @@ static CURLcode getinfo_long(struct Curl_easy *data, CURLINFO info,
case 20:
*param_longp = CURL_HTTP_VERSION_2_0;
break;
+ case 30:
+ *param_longp = CURL_HTTP_VERSION_3;
+ break;
default:
*param_longp = CURL_HTTP_VERSION_NONE;
break;
diff --git a/lib/url.c b/lib/url.c
index c61319b3b..99bea3f01 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3201,7 +3201,7 @@ static CURLcode parse_connect_to_slist(struct Curl_easy *data,
break;
case ALPN_h3:
conn->transport = TRNSPRT_QUIC;
- conn->httpversion = CURL_HTTP_VERSION_LAST; /* for the moment */
+ conn->httpversion = CURL_HTTP_VERSION_3;
break;
default: /* shouldn't be possible */
break;