-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: add H3 client config support #2609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great start! I appreciate the work, and it's quite thorough. I left some thoughts inline.
/// and accommodate future changes without breaking existing implementations. | ||
#[cfg(feature = "http3")] | ||
#[cfg_attr(docsrs, doc(cfg(all(reqwest_unstable, feature = "http3",))))] | ||
pub fn http3_send_grease(mut self, enabled: bool) -> ClientBuilder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTTP/2 doesn't really have much of a concept of grease. Like, maybe someone somewhere wishes it did, but it wasn't embraced nearly as well as it was for HTTP/3. For this method, I'd make the first sentence brief, like "Enable whether to send HTTP/3 protocol grease on the connections." And then in a second paragraph, explain what it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for your feedback and guidance. I will optimize the doc and resubmit it.
I encountered issues with some cloud provider cdn where enabling QUIC caused request failures due to the absence of grease.
src/async_impl/client.rs
Outdated
/// for extended CONNECT in HTTP/3; instead, the SETTINGS_ENABLE_WEBTRANSPORT setting implies that an endpoint supports extended CONNECT. | ||
#[cfg(feature = "http3")] | ||
#[cfg_attr(docsrs, doc(cfg(all(reqwest_unstable, feature = "http3",))))] | ||
pub fn http3_enable_extended_connect(mut self, enabled: bool) -> ClientBuilder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option, and the next one (datagrams), should probably only be added once the user can make use of them in a request. So for now, I'd leave them out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have already removed it.
Co-authored-by: Sean McArthur <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Bumps reqwest from 0.12.15 to 0.12.16. Release notes Sourced from reqwest's releases. v0.12.16 Highlights Add ClientBuilder::http3_congestion_bbr() to enable BBR congestion control. Add ClientBuilder::http3_send_grease() to configure whether to send use QUIC grease. Add ClientBuilder::http3_max_field_section_size() to configure the maximum response headers. Add ClientBuilder::tcp_keepalive_interval() to configure TCP probe interval. Add ClientBuilder::tcp_keepalive_retries() to configure TCP probe count. Add Proxy::headers() to add extra headers that should be sent to a proxy. Fix redirect::Policy::limit() which had an off-by-1 error, allowing 1 more redirect than specified. Fix HTTP/3 to support streaming request bodies. (wasm) Fix null bodies when calling Response::bytes_stream(). What's Changed Clarify that Response::content_length() is not derived from a Content-Length header in docs by @babolivier in seanmonstar/reqwest#2588 docs: link to char::REPLACEMENT_CHARACTER by @marcospb19 in seanmonstar/reqwest#1880 feat: add H3 client config support by @smalls0098 in seanmonstar/reqwest#2609 chore: update brotli to v7 by @nyurik in seanmonstar/reqwest#2620 Do not pull in an entirely different DEFLATE implementation just for tests by @Shnatsel in seanmonstar/reqwest#2625 chore: fix some typos in comment by @xixishidibei in seanmonstar/reqwest#2628 fix(wasm): handle null body in bytes_stream by @alongubkin in seanmonstar/reqwest#2632 ClientBuilder::interface on macOS/Solarish OSes by @hawkw in seanmonstar/reqwest#2623 ci: use ubuntu-latest in nightly job by @seanmonstar in seanmonstar/reqwest#2646 feat: BBR congestion control for http3 by @threeninesixseven in seanmonstar/reqwest#2642 feat: Add extentions for Request by @Xuanwo in seanmonstar/reqwest#2647 refactor: Store request timeout in request extensions instead by @Xuanwo in seanmonstar/reqwest#2650 chore: make ci pass by @linyihai in seanmonstar/reqwest#2666 update h3 dependencys by @Ruben2424 in seanmonstar/reqwest#2670 Document reqwest can make TLS and cookie requests with Wasm by @nickbabcock in seanmonstar/reqwest#2661 fix(redirect): make the number of redirects of policy matches its maximum limit. by @linyihai in seanmonstar/reqwest#2664 Exposed hyper tcp keepalive interval and retries parameters by @mackliet in seanmonstar/reqwest#2675 refactor: use hyper-util's proxy::Matcher by @seanmonstar in seanmonstar/reqwest#2681 Support streaming request body in HTTP/3 by @ducaale in seanmonstar/reqwest#2673 refactor: use hyper-util Tunnel by @seanmonstar in seanmonstar/reqwest#2684 Upgrade webpki-roots to 1 by @djc in seanmonstar/reqwest#2688 refactor: remove futures-util unless using stream/multipart/compression/blocking by @paolobarbolini in seanmonstar/reqwest#2692 chore: replace rustls-pemfile with rustls-pki-types by @tottoto in seanmonstar/reqwest#2541 Ensure H3ResponseFuture Implements Sync by @ducaale in seanmonstar/reqwest#2685 feat(redirect): Using FollowRedirect from tower-http to handle the redirect loop by @linyihai in seanmonstar/reqwest#2617 feat: add customizable headers in proxy mode by @chanbengz in seanmonstar/reqwest#2600 Prepare v0.12.16 by @seanmonstar in seanmonstar/reqwest#2694 New Contributors @babolivier made their first contribution in seanmonstar/reqwest#2588 @marcospb19 made their first contribution in seanmonstar/reqwest#1880 @smalls0098 made their first contribution in seanmonstar/reqwest#2609 @Shnatsel made their first contribution in seanmonstar/reqwest#2625 @xixishidibei made their first contribution in seanmonstar/reqwest#2628 @alongubkin made their first contribution in seanmonstar/reqwest#2632 ... (truncated) Changelog Sourced from reqwest's changelog. v0.12.16 Add ClientBuilder::http3_congestion_bbr() to enable BBR congestion control. Add ClientBuilder::http3_send_grease() to configure whether to send use QUIC grease. Add ClientBuilder::http3_max_field_section_size() to configure the maximum response headers. Add ClientBuilder::tcp_keepalive_interval() to configure TCP probe interval. Add ClientBuilder::tcp_keepalive_retries() to configure TCP probe count. Add Proxy::headers() to add extra headers that should be sent to a proxy. Fix redirect::Policy::limit() which had an off-by-1 error, allowing 1 more redirect than specified. Fix HTTP/3 to support streaming request bodies. (wasm) Fix null bodies when calling Response::bytes_stream(). Commits 99259cb v0.12.16 57670ac feat: add customizable headers for reqwest::Proxy (#2600) d9cf60e refactor: Using FollowRedirect from tower-http to handle the redirect l... 75f62f2 fix: ensure H3ResponseFuture is sync (#2685) 0e1d188 chore: replace rustls-pemfile with rustls-pki-types (#2541) 705b613 refactor: remove futures-util unless using stream/multipart/compression... 7b80718 Upgrade webpki-roots to 1 (#2688) 152a560 refactor: use hyper-util Tunnel (#2684) df09c9e feat: support streaming request body in HTTP/3 (#2673) 4ec1fe5 refactor: use hyper-util's proxy::Matcher (#2681) Additional commits viewable in compare view Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase. Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: @dependabot rebase will rebase this PR @dependabot recreate will recreate this PR, overwriting any edits that have been made to it @dependabot merge will merge this PR after your CI passes on it @dependabot squash and merge will squash and merge this PR after your CI passes on it @dependabot cancel merge will cancel a previously requested merge and block automerging @dependabot reopen will reopen this PR if it is closed @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
cc hyperium/h3#206 .