aboutsummaryrefslogtreecommitdiff
path: root/src/tls_util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tls_util.rs')
-rw-r--r--src/tls_util.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tls_util.rs b/src/tls_util.rs
index 91ad31c..836f41e 100644
--- a/src/tls_util.rs
+++ b/src/tls_util.rs
@@ -23,8 +23,11 @@ pub struct HttpsConnectorFixedDnsname<T> {
}
type BoxError = Box<dyn std::error::Error + Send + Sync>;
impl HttpsConnectorFixedDnsname<HttpConnector> {
- pub fn new(mut tls_config: rustls::ClientConfig, fixed_dnsname: &'static str) -> Self {
- let mut http = HttpConnector::new();
+ pub fn new(
+ mut tls_config: rustls::ClientConfig,
+ fixed_dnsname: &'static str,
+ mut http: HttpConnector,
+ ) -> Self {
http.enforce_http(false);
tls_config.alpn_protocols = vec![b"h2".to_vec(), b"http/1.1".to_vec()];
Self {