Closed jcamiel closed 10 months ago
Our doc comment was lifted straight from the libcurl man page, but it looks like it actually changed behaviors in version 7.88 when CURL_HTTP_VERSION_3ONLY
was added: https://github.com/curl/curl/commit/a56d2b0b94d2f6583ac0fd7605e4e4d1644c2ba9. When we initially added this, CURL_HTTP_VERSION_3
didn't allow any fallback.
But we can update this now. Maybe worth noting in the doc comment that the behavior varies between version >=7.66,<7.88 and >=7.88, depending on which version of libcurl you are linked to.
I can propose a PR with an updated comment if that help,
PR here => https://github.com/alexcrichton/curl-rust/pull/521 (relevant curl PR is https://github.com/curl/curl/pull/10264)
To use HTTP 3 we can use the following code:
HttpVersion::V3
is defined as as https://github.com/alexcrichton/curl-rust/blob/ff6ad21cc1034826b2ab3f8be0653d8c446e1bdc/src/easy/handler.rs#L455-L465And
curl_sys::CURL_HTTP_VERSION_3
is defined here:https://github.com/alexcrichton/curl-rust/blob/ff6ad21cc1034826b2ab3f8be0653d8c446e1bdc/curl-sys/lib.rs#L663-L665
The comment of this flag states that
Whereas in
curl.h
the corresponding flag is definedhttps://github.com/curl/curl/blob/9bca45dba81d77de06757ce13fc9193e09e010b5/include/curl/curl.h#L2272-L2274
libcurl seems to fallback when using this flag whereas comments in crates curl imply that there is no fallback...