From 570c2e961f5fb6e452f3a43b7e72bfcdae7e8dce Mon Sep 17 00:00:00 2001 From: Dylan Chen Date: Wed, 25 Oct 2023 17:45:12 +0800 Subject: [PATCH 1/2] use http --- src/object_store/src/object/s3.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/object_store/src/object/s3.rs b/src/object_store/src/object/s3.rs index 69e7f3687fdeb..a479f98a56310 100644 --- a/src/object_store/src/object/s3.rs +++ b/src/object_store/src/object/s3.rs @@ -530,12 +530,7 @@ impl S3ObjectStore { pub fn new_http_connector(config: &S3ObjectStoreConfig) -> impl Into { // Customize http connector to set keepalive. - let native_tls = { - let mut tls = hyper_tls::native_tls::TlsConnector::builder(); - let tls = tls - .min_protocol_version(Some(hyper_tls::native_tls::Protocol::Tlsv12)) - .build() - .unwrap_or_else(|e| panic!("Error while creating TLS connector: {}", e)); + let connector = { let mut http = hyper::client::HttpConnector::new(); // connection config @@ -556,13 +551,13 @@ impl S3ObjectStore { } http.enforce_http(false); - hyper_tls::HttpsConnector::from((http, tls.into())) + http }; aws_smithy_client::hyper_ext::Adapter::builder() .hyper_builder(hyper::client::Builder::default()) .connector_settings(ConnectorSettings::builder().build()) - .build(monitor_connector(native_tls, "S3")) + .build(monitor_connector(connector, "S3")) } pub async fn new_with_config( From 36939f07fc62637836457bceeb3069e2500466e1 Mon Sep 17 00:00:00 2001 From: Dylan Chen Date: Thu, 2 Nov 2023 13:23:39 +0800 Subject: [PATCH 2/2] fmt --- src/object_store/src/object/mod.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/object_store/src/object/mod.rs b/src/object_store/src/object/mod.rs index 96e58397dfa82..78054be89caa2 100644 --- a/src/object_store/src/object/mod.rs +++ b/src/object_store/src/object/mod.rs @@ -444,9 +444,6 @@ impl MonitoredStreamingReader { } } - // This is a clippy bug, see https://github.com/rust-lang/rust-clippy/issues/11380. - // TODO: remove `allow` here after the issued is closed. - #[expect(clippy::needless_pass_by_ref_mut)] pub async fn read_bytes(&mut self, buf: &mut [u8]) -> ObjectResult { let operation_type = "streaming_read_read_bytes"; let data_len = buf.len();