Fix detection of system proxy from Windows registry (#1005)

This commit is contained in:
fuyu
2020-08-19 11:38:21 -07:00
committed by GitHub
parent 512fb97ffc
commit 9e23103371
4 changed files with 135 additions and 19 deletions

View File

@@ -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);