Skip to content

build(deps)!: migrate to wreq 0.16 and wreq-util 0.2 - #196

Merged
sqdshguy merged 3 commits into
masterfrom
chore/bump-wreq-0.16
Aug 23, 2026
Merged

build(deps)!: migrate to wreq 0.16 and wreq-util 0.2#196
sqdshguy merged 3 commits into
masterfrom
chore/bump-wreq-0.16

Conversation

@sqdshguy

Copy link
Copy Markdown
Owner

No description provided.

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.
@sqdshguy
sqdshguy merged commit 52986f8 into master Aug 23, 2026
8 checks passed
@sqdshguy
sqdshguy deleted the chore/bump-wreq-0.16 branch August 23, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant