]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl.h: add CURL_HTTP_VERSION_3ONLY
authorDaniel Stenberg <daniel@haxx.se>
Mon, 9 Jan 2023 13:59:27 +0000 (14:59 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 12 Jan 2023 15:17:55 +0000 (16:17 +0100)
As the previous CURL_HTTP_VERSION_3 option gets a slightly altered meaning.

Closes #10264

docs/libcurl/opts/CURLOPT_HTTP_VERSION.3
docs/libcurl/symbols-in-versions
include/curl/curl.h

index 18d9ba75efa450a047506b0a1fb7766ca5320398..4a2bc2bbc04163ff4f38d1501dda697806e69bf6 100644 (file)
@@ -66,13 +66,12 @@ prior knowledge that the server supports HTTP/2 straight away. HTTPS requests
 will still do HTTP/2 the standard way with negotiated protocol version in the
 TLS handshake. (Added in 7.49.0)
 .IP CURL_HTTP_VERSION_3
-(Added in 7.66.0) Setting this value will make libcurl attempt to use HTTP/3
-directly to server given in the URL. Note that this cannot gracefully
-downgrade to earlier HTTP version if the server does not support HTTP/3.
-
-For more reliably upgrading to HTTP/3, set the preferred version to something
-lower and let the server announce its HTTP/3 support via Alt-Svc:. See
-\fICURLOPT_ALTSVC(3)\fP.
+(Added in 7.66.0) This option makes libcurl attempt to use HTTP/3 to the host
+given in the URL, with fallback to earlier HTTP versions if needed.
+.IP CURL_HTTP_VERSION_3ONLY
+(Added in 7.88.0) Setting this value will make libcurl attempt to use HTTP/3
+directly to server given in the URL but will not downgrade to earlier HTTP
+version if the server does not support HTTP/3.
 .SH DEFAULT
 Since curl 7.62.0: CURL_HTTP_VERSION_2TLS
 
index 54605eed000db4dc7b513856b8a8da9cd92186ed..4081314e0adcf0c4783c648f1867d09ed5958e82 100644 (file)
@@ -53,6 +53,7 @@ CURL_HTTP_VERSION_2_0           7.33.0
 CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 7.49.0
 CURL_HTTP_VERSION_2TLS          7.47.0
 CURL_HTTP_VERSION_3             7.66.0
+CURL_HTTP_VERSION_3ONLY         7.88.0
 CURL_HTTP_VERSION_NONE          7.9.1
 CURL_HTTPPOST_BUFFER            7.46.0
 CURL_HTTPPOST_CALLBACK          7.46.0
index c599b4d3fc47352245a84e001af436a839147555..8cc0b6ffe33abdb8c29f6edd20ceff757e96c7ee 100644 (file)
@@ -2259,8 +2259,13 @@ 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, /* Makes use of explicit HTTP/3 without fallback.
-                               Use CURLOPT_ALTSVC to enable HTTP/3 upgrade */
+  CURL_HTTP_VERSION_3 = 30, /* Use HTTP/3, fallback to HTTP/2 or HTTP/1 if
+                               needed. For HTTPS only. For HTTP, this option
+                               makes libcurl return error. */
+  CURL_HTTP_VERSION_3ONLY = 31, /* Use HTTP/3 without fallback. For HTTPS
+                                   only. For HTTP, this makes libcurl
+                                   return error. */
+
   CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
 };