build(deps)!: migrate to wreq 0.16 and wreq-util 0.2 - #196
Merged
Conversation
The session cookie jar is shared between HTTP requests and WebSocket
handshakes, and the handshake path handed it the `ws://` URL as-is.
That only worked because the jar used to be lenient about schemes. RFC
6265 retrieval is defined over http/https origins, and a jar that
enforces it drops every cookie for a `ws://` URI:
if !(uri.is_http() || uri.is_https())
|| ...
{
return false;
}
Browsers scope WebSocket cookies to the equivalent HTTP origin, so do
the same here. `cookie_origin_uri` rewrites ws -> http and wss -> https
before the jar is consulted and passes everything else through
untouched, borrowing rather than allocating on that path.
The websocket handshake was the visible caller, but `get_session_cookies`
and `set_session_cookie` take a URL from JS and would mis-scope a
`ws://` one the same way, so all three go through the helper.
Upstream reset the version baseline on 2026-08-22, so these numbers go
down while moving forward: wreq 6.0.0-rc.31 became 0.16.0 and wreq-util
3.0.0-rc.14 became 0.2.0. cargo reports the bump as "Downgrading" and
crates.io still advertises max_version = 6.0.0-rc.31, but both are
artifacts of the renumbering. The mapping is in
0x676e67/wreq#1254
Most of the wreq cycle was internal - the client moved onto Tower
middleware and the core HTTP implementation moved into wreq-proto - and
none of the documented breaking changes apply to us, since this crate
already tracked the 6.0.0-rc line. What lands here is behavioural:
- cookie domain matching and Max-Age expiration corrected
- referrer policy applied across redirects
- resolved addresses raced within a single connect timeout
- read timeouts classified as body errors rather than transport ones
- Error::is_dns() added
- WinINET IP wildcards honoured in the Windows system proxy rules
wreq-util carries one functional change, a header order and missing
header correction in the emulation profiles. The profile set is
unchanged at 133, and generated_profiles.rs and generated-types.ts
regenerate byte-identical.
The MSRV moves to Rust 1.98. CI resolves the toolchain through
dtolnay/rust-toolchain@stable, so there is no pin to raise.
Four comments dated their observation to wreq 6.0.0-rc.29 or wreq-util 3.0.0-rc.14. After the version reset those numbers point at nothing a reader can look up, and rewriting them to 0.16 and 0.2 would be wrong, since the changes they describe did not land there. The versions were never doing any work in these comments - each one explains why the surrounding code looks the way it does, and reads the same without a number attached. Drop them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.