Fix detection of system proxy from Windows registry (#1005)
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
#[cfg(feature = "__tls")]
|
||||
#[tokio::test]
|
||||
async fn test_badssl_modern() {
|
||||
let text = reqwest::get("https://mozilla-modern.badssl.com/")
|
||||
let text = reqwest::Client::builder()
|
||||
.no_proxy()
|
||||
.build()
|
||||
.unwrap()
|
||||
.get("https://mozilla-modern.badssl.com/")
|
||||
.send()
|
||||
.await
|
||||
.unwrap()
|
||||
.text()
|
||||
@@ -16,6 +21,7 @@ async fn test_badssl_modern() {
|
||||
async fn test_rustls_badssl_modern() {
|
||||
let text = reqwest::Client::builder()
|
||||
.use_rustls_tls()
|
||||
.no_proxy()
|
||||
.build()
|
||||
.unwrap()
|
||||
.get("https://mozilla-modern.badssl.com/")
|
||||
@@ -34,6 +40,7 @@ async fn test_rustls_badssl_modern() {
|
||||
async fn test_badssl_self_signed() {
|
||||
let text = reqwest::Client::builder()
|
||||
.danger_accept_invalid_certs(true)
|
||||
.no_proxy()
|
||||
.build()
|
||||
.unwrap()
|
||||
.get("https://self-signed.badssl.com/")
|
||||
@@ -52,6 +59,7 @@ async fn test_badssl_self_signed() {
|
||||
async fn test_badssl_wrong_host() {
|
||||
let text = reqwest::Client::builder()
|
||||
.danger_accept_invalid_hostnames(true)
|
||||
.no_proxy()
|
||||
.build()
|
||||
.unwrap()
|
||||
.get("https://wrong.host.badssl.com/")
|
||||
|
||||
@@ -28,7 +28,14 @@ async fn auto_headers() {
|
||||
});
|
||||
|
||||
let url = format!("http://{}/1", server.addr());
|
||||
let res = reqwest::get(&url).await.unwrap();
|
||||
let res = reqwest::Client::builder()
|
||||
.no_proxy()
|
||||
.build()
|
||||
.unwrap()
|
||||
.get(&url)
|
||||
.send()
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(res.url().as_str(), &url);
|
||||
assert_eq!(res.status(), reqwest::StatusCode::OK);
|
||||
|
||||
@@ -76,6 +76,7 @@ async fn response_timeout() {
|
||||
|
||||
let client = reqwest::Client::builder()
|
||||
.timeout(Duration::from_millis(500))
|
||||
.no_proxy()
|
||||
.build()
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user