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

@@ -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/")