From 9b76b7567420f6f331a0c29b4d530c1125f6c9b6 Mon Sep 17 00:00:00 2001 From: Stephane Gouache Date: Tue, 24 Sep 2024 17:32:56 +0200 Subject: [PATCH] Change client init --- src/s3plugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/s3plugin.cpp b/src/s3plugin.cpp index cd313d4..8a8bb31 100644 --- a/src/s3plugin.cpp +++ b/src/s3plugin.cpp @@ -760,22 +760,22 @@ int driver_connect() // Initialisation du SDK AWS Aws::InitAPI(options); - Aws::Client::ClientConfiguration clientConfig; + Aws::Client::ClientConfiguration clientConfig(true, "legacy", true); clientConfig.allowSystemProxy = getenv("http_proxy") != NULL || getenv("https_proxy") != NULL || getenv("HTTP_PROXY") != NULL || getenv("HTTPS_PROXY") != NULL || getenv("S3_ALLOW_SYSTEM_PROXY"); clientConfig.verifySSL = false; + // Force HTTP1.1 since S3 service doesn't support HTTP2 yet! clientConfig.version = Aws::Http::Version::HTTP_VERSION_1_1; if (s3endpoint != "") { clientConfig.endpointOverride = std::move(s3endpoint); } - /* if (s3region != "") { clientConfig.region = s3region; } -*/ + if (!s3accessKey.empty()) { configCredentials = Aws::Auth::AWSCredentials(s3accessKey, s3secretKey);