Releases: neonmoe/minreq
3.0.0-rc.1
Nothing to see here, added some excludes in the Cargo.toml and cleaned up the rustls cert provider dependency feature gates. Just releasing these changes as an RC so that the final RC would be identical to the actual 3.0.0 release.
3.0.0-rc.0
This is the first release candidate for 3.0. If no issues are found, I'll release 3.0 in a few weeks.
Includes all the planned changes that have been accumulating over the years for 3.0, renames some features, but otherwise tries to keep everything the same as 2.0. Note that everything under Changed and Removed here is a breaking change.
Changed
- MSRV from 1.48 to 1.63, and updated the policy to be looser (now tracking Debian oldstable's Rust version instead of settling on a specific version until eternity, and the MSRV no longer applies to any optional features).
- The
minreq::Errortype to be non-exhaustive, to make adding new errors later possible, and added new variants:NativeTlsCreateConnection,OpenSslCreateConnection,InvalidProtocol, andInvalidProtocolInRedirect. - The default proxy port to 1080, to match curl.
- The default maximum sizes for the response status line and headers, both 8KiB.
- The type of
Response::headersandResponseLazy::headersfromHashMap<String, String>toVec<(String, String)>, and removed lowercase normalization of the field names.- To help the usual case, there's two new functions,
Response::headerandResponse::headers, to get the header value (or all values, if there are multiple of the same header) by field name. In other cases, iterate through and usestr::eq_ignore_ascii_caseto find your header(s).
- To help the usual case, there's two new functions,
- The query parameter function to take
AsRef<str>instead ofInto<String>to avoid unnecessary allocations. Thanks for the PR, @alpha-tango-kilo! (#69) Response::status_codeandResponseLazy::status_codetype fromi32tou16. Thanks for the suggestion, @ModProg!
(#118)- Renamed features
https-bundledtohttps-openssl,https-bundled-probetohttps-openssl-probe, andhttps-nativetohttps-native-tlsto make them a little more obvious in what they bring in.
Removed
Iteratorimpl forResponseLazy, see the addition section for more on the newReadimpl. Thanks for the PR, @mrkline! (#104)
Added
Response::headerandResponse::headersfor ergonomically sorting through the headers of a response, now that they aren't in a convenientHashMapanymore.Readimpl forResponseLazy. This improves performance, and theReadtrait generally matches the functionality better thanIterator. Thanks for the PR, @mrkline! (#104)
2.14.1
2.14.0
Cleaned up the https-bundled and https-bundled-probe code quite a bit. Now it's more "openssl backend" rather than "native-tls backend but vendored", so the features might change their names to https-openssl in the next major version, whenever that ends up happening.
Also, added a new option for requests, Request::with_follow_redirects, which can be used to disable redirection, for cases where you want to read the redirection HTTP responses themselves.
Changed
https-bundled,https-bundled-probe: Removed almost all of the bundled native-tls code (~1k LoC), only keeping the relevant part (~30 LoC). There should be no change to the actual code that ends up being ran, but if you're using these features, make sure to test that everything works as you expect, something might have slipped.
Fixed
https-*: Refactored the TLS handling code a bit. This should have no visible effect downstream,src/connection.rsis just a little bit more readable now.- Removed
build.rs, which turned out to be dead code. This should have no effect, but if it does, it should also only affect thehttps-bundledandhttps-bundled-probefeatures.
Added
Request::with_follow_redirectsfor disabling redirection handling. Thanks for the suggestion, @tachibanayui! (#120)
2.13.4
2.13.3
A bit of dependency cleanup, and updated the list of crates that need to be pinned to build with MSRV.
Fixed
- Removed the
once_celldependency by making use of the newstd::sync::OnceLocktype. This change only affects the rustls-based https features. Thanks for the PR, @LyonSyonII! (#115) - MSRV builds that got broken due to a
rustixupdate. Nowtempfileis pinned as well.
2.13.2
"Cleaned up" some code in 2.13.1, thinking that minreq doesn't have a build.rs, but it does, and the code could actually be enabled via an environment variable. Reverted that bit here.
Fixed
- Reverted a part of 2.13.1, accidentally removed some code that wasn't actually dead code.
2.13.1
Only affects builds using the https-bundled-probe feature.
This is a tiny update to the copied-over native-tls cert loading code when using openssl-probe without native-tls, to avoid an apparently unsafe function in openssl-probe.
Fixed
- Usage of an openssl-probe function that's deprecated due to safety issues. See rustsec/advisory-db#2209 for further info.
2.13.0
Small fixups all around, mostly code size improvements. In case your application depends specifically on webpki-roots certs being used, but still uses the https-rustls-probe feature, I'm afraid you'll have to stay on 2.12. I hope this isn't the case for anyone.
Also: periodic MSRV CI did its job! It took me 5 days to notice the notification, but still a big improvement in issue-appearance-to-fix-latency.
Changed
- The
https-rustls-probefeature no longer brings in thewebpki-rootsandrustls-webpkicrates. Thanks for the report, @polarathene! (#111)
Fixed
2.12.0
A new convenience function, Request::with_headers! And in maintenance news, I added a schedule for the msrv job, so hopefully I'll notice it failing when it starts failing rather than on every new pull request.