From 49a9f13c3997494aee368f0b2c4104b370f509e6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 27 Feb 2023 10:12:59 +0100 Subject: [PATCH] examples/http3.c: use CURL_HTTP_VERSION_3 and update the comment Closes #10619 --- docs/examples/http3.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/examples/http3.c b/docs/examples/http3.c index 7e30845a55..900e119208 100644 --- a/docs/examples/http3.c +++ b/docs/examples/http3.c @@ -37,11 +37,9 @@ int main(void) if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); - /* Forcing HTTP/3 will make the connection fail if the server is not - accessible over QUIC + HTTP/3 on the given host and port. - Consider using CURLOPT_ALTSVC instead! */ + /* Use HTTP/3 but fallback to earlier HTTP if necessary */ curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, - (long)CURL_HTTP_VERSION_3ONLY); + (long)CURL_HTTP_VERSION_3); /* Perform the request, res will get the return code */ res = curl_easy_perform(curl); -- 2.47.3