Repository navigation
v0.4.1
Patch release. One consumer-visible fix; the rest is documentation and CI hardening.
Fixed
A non-UTF-8 header value no longer panics when a Response is serialized.
UpstreamResponse and UpstreamRequest built their header maps with value.to_str().unwrap(). HeaderValue::to_str rejects anything that is not visible ASCII, but RFC 9110 permits opaque octets (obs-text) in a field value — so a server could panic the caller's task simply by sending one. Because the panic was inside a Serialize impl, it was reachable from json!(response) or any other serialization of a Response.
Header values are now decoded with String::from_utf8_lossy, matching how the response body was already handled: an unusual or hostile header degrades to replacement characters instead of unwinding. Covered by a regression test per impl.
If you serialize Response values and talk to servers you do not control, this is worth taking.
Documentation
All seven doc examples were broken and nothing was running them — CI used cargo test --lib, which skips doctests entirely.
Response::from_jsonandResponse::request_from_jsoncalledpostwith three arguments against its four-argument signature.Response::bodytried toDisplaya&[u8].- The
wsexample was stale against tokio-tungstenite 0.29, whereMessage::TexttakesUtf8Bytesrather thanStringandinto_data()returnsBytesrather thanVec<u8>. The same stale snippet in the README is corrected too — so the websocket example on the front page now reflects the API you actually get.
All seven are now marked no_run: type-checked on every build, never executed. CI gained a cargo test --doc step so they cannot rot unnoticed again.
Internal
quinn-proto bumped to 0.11.18 in Cargo.lock for a RUSTSEC advisory. Lockfile-only — it is not reachable in the built dependency graph, and a library's lockfile does not bind its dependents, so this has no effect on consumers.
Unchanged
No API changes. The live Tor request path is untouched.
Full detail: #8