From 5ad61fcee236199c7a5d92c11bb6f9895776dd70 Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Wed, 20 May 2026 14:53:02 +0100 Subject: [PATCH 1/2] Fix control-char property test The control character proptest assumed only ASCII whitespace could be trimmed from the end of the input. Url::parse uses str::trim(), which follows Rust's Unicode whitespace rules, so trailing vertical tab was accepted after trimming and the test failed. Fix the test to skip trailing control characters using char::is_whitespace() instead of is_ascii_whitespace(), so the property matches the parser's actual behavior. --- bitreq/tests/url_properties.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitreq/tests/url_properties.rs b/bitreq/tests/url_properties.rs index 508bac0c..47dff34c 100644 --- a/bitreq/tests/url_properties.rs +++ b/bitreq/tests/url_properties.rs @@ -333,7 +333,7 @@ proptest! { ctrl_char in 0u8..32u8, suffix in "[a-z]{0,10}" ) { - if ctrl_char.is_ascii_whitespace() && suffix.is_empty() { + if char::from(ctrl_char).is_whitespace() && suffix.is_empty() { return Ok(()); } let invalid_url = format!("{}{}{}", prefix, ctrl_char as char, suffix); From 4127c8bd2ec87de2548cdef3c478c493b52a7e76 Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Wed, 20 May 2026 14:38:01 +0100 Subject: [PATCH 2/2] Gate webpki_roots import on webpki-roots rustls_stream.rs imported and used webpki_roots::TLS_SERVER_ROOTS behind the rustls-webpki feature. Enabling rustls-webpki in the CI test without webpki-roots causes a failure. Gate the import on webpki-roots, which is the feature that enables that crate. --- bitreq/src/connection/rustls_stream.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitreq/src/connection/rustls_stream.rs b/bitreq/src/connection/rustls_stream.rs index 62602b0f..db7d1f82 100644 --- a/bitreq/src/connection/rustls_stream.rs +++ b/bitreq/src/connection/rustls_stream.rs @@ -17,7 +17,7 @@ use rustls::{self, ClientConfig, ClientConnection, RootCertStore, StreamOwned}; use tokio_native_tls::TlsConnector as AsyncTlsConnector; #[cfg(any(feature = "async-https-rustls", feature = "async-https-rustls-probe"))] use tokio_rustls::{client::TlsStream, TlsConnector}; -#[cfg(feature = "rustls-webpki")] +#[cfg(feature = "webpki-roots")] use webpki_roots::TLS_SERVER_ROOTS; #[cfg(any(feature = "async-https-rustls", feature = "async-https-rustls-probe"))] @@ -41,7 +41,7 @@ fn build_client_config() -> Arc { let _ = root_certificates.add(cert); } - #[cfg(feature = "rustls-webpki")] + #[cfg(feature = "webpki-roots")] root_certificates.extend(TLS_SERVER_ROOTS.iter().cloned()); let config =