diff options
author | Alex Auvolat <alex@adnab.me> | 2022-01-24 20:55:26 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-01-24 20:55:26 +0100 |
commit | ea050c7045764f69a6dd25a2b0c75186dddfc50e (patch) | |
tree | 595ab80389b62f3a7f797d4e6e710fa09bfe8f4f /src/tls_util.rs | |
parent | 7d5070c57dabfb22c5bd17a850adcbbfa19d730a (diff) | |
download | tricot-ea050c7045764f69a6dd25a2b0c75186dddfc50e.tar.gz tricot-ea050c7045764f69a6dd25a2b0c75186dddfc50e.zip |
Actually that was quite a stupid way of handling timeoutsdocker-33
Diffstat (limited to 'src/tls_util.rs')
-rw-r--r-- | src/tls_util.rs | 7 |
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 { |