aws-*: Update (#428410)

This commit is contained in:
Sandro
2025-07-29 14:01:11 +02:00
committed by GitHub
19 changed files with 33 additions and 328 deletions
+2 -2
View File
@@ -16,13 +16,13 @@
stdenv.mkDerivation rec {
pname = "aws-c-auth";
# nixpkgs-update: no auto update
version = "0.8.1";
version = "0.9.0";
src = fetchFromGitHub {
owner = "awslabs";
repo = "aws-c-auth";
rev = "v${version}";
hash = "sha256-p8D79BRjaPlhzap/FWbqMlkrbVELSgeJW8CljxBAaCI=";
hash = "sha256-HzDUINTmgjW7rNEe+5iwZBv6ayxNKmGAJy+Lg4tp1t0=";
};
nativeBuildInputs = [
@@ -1,33 +0,0 @@
From: Emil Lerch <emil@lerch.org>
Date: Wed, 28 Apr 2021 17:46:24 -0700
Subject: [PATCH] Allow dlopen to fail on musl systems
Now that references are forced when linking statically, the assertion is
no longer necessary. See https://github.com/awslabs/aws-c-cal/pull/54
---
source/unix/openssl_platform_init.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/source/unix/openssl_platform_init.c b/source/unix/openssl_platform_init.c
index 5266ecc1..99f210bd 100644
--- a/source/unix/openssl_platform_init.c
+++ b/source/unix/openssl_platform_init.c
@@ -496,7 +502,6 @@ static enum aws_libcrypto_version s_resolve_libcrypto(void) {
/* Try to auto-resolve against what's linked in/process space */
FLOGF("searching process and loaded modules");
void *process = dlopen(NULL, RTLD_NOW);
- AWS_FATAL_ASSERT(process && "Unable to load symbols from process space");
enum aws_libcrypto_version result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_LC, process);
if (result == AWS_LIBCRYPTO_NONE) {
result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_1_0_2, process);
@@ -504,7 +509,9 @@ static enum aws_libcrypto_version s_resolve_libcrypto(void) {
if (result == AWS_LIBCRYPTO_NONE) {
result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_1_1_1, process);
}
- dlclose(process);
+ if (process) {
+ dlclose(process);
+ }
if (result == AWS_LIBCRYPTO_NONE) {
FLOGF("libcrypto symbols were not statically linked, searching for shared libraries");
+2 -7
View File
@@ -11,20 +11,15 @@
stdenv.mkDerivation (finalAttrs: {
pname = "aws-c-cal";
# nixpkgs-update: no auto update
version = "0.8.0";
version = "0.9.2";
src = fetchFromGitHub {
owner = "awslabs";
repo = "aws-c-cal";
rev = "v${finalAttrs.version}";
hash = "sha256-dYFUYdMQMT8CZFMrCrhQ8JPEhA4CVf+f7VLFt3JNmn8=";
hash = "sha256-ufMoB71xebxO/Cu/xVQ3BMrcCgIlkG+MXH2Ru2i6uXo=";
};
patches = [
# Fix openssl adaptor code for musl based static binaries.
./aws-c-cal-musl-compat.patch
];
nativeBuildInputs = [ cmake ];
buildInputs = [
+2 -2
View File
@@ -9,13 +9,13 @@
stdenv.mkDerivation rec {
pname = "aws-c-common";
# nixpkgs-update: no auto update
version = "0.10.3";
version = "0.12.4";
src = fetchFromGitHub {
owner = "awslabs";
repo = "aws-c-common";
rev = "v${version}";
hash = "sha256-sA6CsLLHh4Ce/+ffl4OhisMSgdrD+EmXvTNGSq7/vvk=";
hash = "sha256-hKCIPZlLPyH7D3Derk2onyqTzWGUtCx+f2+EKtAKlwA=";
};
nativeBuildInputs = [ cmake ];
@@ -10,13 +10,13 @@
stdenv.mkDerivation rec {
pname = "aws-c-compression";
# nixpkgs-update: no auto update
version = "0.3.0";
version = "0.3.1";
src = fetchFromGitHub {
owner = "awslabs";
repo = "aws-c-compression";
rev = "v${version}";
sha256 = "sha256-EjvOf2UMju6pycPdYckVxqQ34VOhrIIyvK+O3AVRED4=";
sha256 = "sha256-gpru+hnppgLHhcPfVBOaMdcT6e8wUjZmY7Caaa/KAW4=";
};
nativeBuildInputs = [
@@ -15,13 +15,13 @@
stdenv.mkDerivation rec {
pname = "aws-c-event-stream";
# nixpkgs-update: no auto update
version = "0.5.0";
version = "0.5.5";
src = fetchFromGitHub {
owner = "awslabs";
repo = "aws-c-event-stream";
rev = "v${version}";
hash = "sha256-lg1qS/u5Fi8nt/tv2ekd8dgQ7rlrF3DrRxqidAoEywY=";
hash = "sha256-wVjpDKKwoksq5gFtvhH76c7ciP0XmMozhkWmzY6GwgU=";
};
nativeBuildInputs = [ cmake ];
+2 -2
View File
@@ -14,13 +14,13 @@
stdenv.mkDerivation rec {
pname = "aws-c-http";
# nixpkgs-update: no auto update
version = "0.9.2";
version = "0.10.4";
src = fetchFromGitHub {
owner = "awslabs";
repo = "aws-c-http";
rev = "v${version}";
hash = "sha256-3nT64dFUcuwPfhQDwY5MTe/xPdr7XZMBpVL7V0y9tng=";
hash = "sha256-t9PoxOjgV9qLris+C18SaEwXodBGcgK591LZl0dajxU=";
};
nativeBuildInputs = [
+2 -2
View File
@@ -12,13 +12,13 @@
stdenv.mkDerivation rec {
pname = "aws-c-io";
# nixpkgs-update: no auto update
version = "0.15.3";
version = "0.21.2";
src = fetchFromGitHub {
owner = "awslabs";
repo = "aws-c-io";
rev = "v${version}";
hash = "sha256-/pG/+MHAu/TYTtY/RQrr1U1ev2FZ1p/O8kIRUDDOcvQ=";
hash = "sha256-QNf4TJIqtypDliiu6I72CbgjyJhdS9Uuim9tZOb3SJs=";
};
nativeBuildInputs = [ cmake ];
+2 -2
View File
@@ -15,13 +15,13 @@
stdenv.mkDerivation rec {
pname = "aws-c-mqtt";
# nixpkgs-update: no auto update
version = "0.11.0";
version = "0.13.3";
src = fetchFromGitHub {
owner = "awslabs";
repo = "aws-c-mqtt";
rev = "v${version}";
hash = "sha256-gIoC3OG6VFzNH9/DjuC42eCIuN+w1AikaGAbx6ao8qQ=";
hash = "sha256-Nf8c5iVl+NOPZFjsAPCMOGq2e7D8e7PafuMQh6t0DYw=";
};
nativeBuildInputs = [
+2 -2
View File
@@ -17,13 +17,13 @@
stdenv.mkDerivation rec {
pname = "aws-c-s3";
# nixpkgs-update: no auto update
version = "0.7.1";
version = "0.8.6";
src = fetchFromGitHub {
owner = "awslabs";
repo = "aws-c-s3";
rev = "v${version}";
hash = "sha256-UE42U3UszobaUdo0ry9IlwTbSbGqmYkux19ILrVgUZY=";
hash = "sha256-g2w1igjv0N0o6+bewypJm2coHTvhYN2v8usdMN7TBI4=";
};
nativeBuildInputs = [
+2 -2
View File
@@ -10,13 +10,13 @@
stdenv.mkDerivation rec {
pname = "aws-c-sdkutils";
# nixpkgs-update: no auto update
version = "0.2.1";
version = "0.2.4";
src = fetchFromGitHub {
owner = "awslabs";
repo = "aws-c-sdkutils";
rev = "v${version}";
hash = "sha256-Z9c+uBiGMXW5v+khdNaElhno16ikBO4voTzwd2mP6rA=";
hash = "sha256-zc8E5ESZxXBJ6WA/V5i2Us61UcNf9wXa2k63NWqGRtI=";
};
nativeBuildInputs = [
+2 -2
View File
@@ -10,13 +10,13 @@
stdenv.mkDerivation rec {
pname = "aws-checksums";
# nixpkgs-update: no auto update
version = "0.2.2";
version = "0.2.7";
src = fetchFromGitHub {
owner = "awslabs";
repo = "aws-checksums";
rev = "v${version}";
sha256 = "sha256-hiqV6FrOZ19YIxL3UKBuexLJwoC2mY7lqysnV7ze0gg=";
sha256 = "sha256-dYDTDWZJJ0JlvkMfLS376uUt5QzSmbV0UNRC4aq35TY=";
};
nativeBuildInputs = [ cmake ];
@@ -1,65 +0,0 @@
From b3a46b9a2a9f86ff416a0ff5f84882c0dedebd14 Mon Sep 17 00:00:00 2001
From: Jan Tojnar <jtojnar@gmail.com>
Date: Sun, 9 Jan 2022 01:57:18 +0100
Subject: [PATCH] build: Make includedir properly overrideable
This is required by some package managers like Nix.
Co-authored-by: Artturin <Artturin@artturin.com>
---
CMakeLists.txt | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f062ca..b28f13c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,6 +49,10 @@ if(${CMAKE_INSTALL_LIBDIR} STREQUAL "lib64")
set(FIND_LIBRARY_USE_LIB64_PATHS true)
endif()
+if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
+ set(CMAKE_INSTALL_INCLUDEDIR "include")
+endif()
+
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
endif()
@@ -329,7 +333,7 @@ endif()
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${GENERATED_INCLUDE_DIR}>
- $<INSTALL_INTERFACE:include>)
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
aws_use_package(aws-c-http)
aws_use_package(aws-c-mqtt)
@@ -346,16 +350,16 @@ aws_add_sanitizers(${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} PUBLIC ${DEP_AWS_LIBS})
-install(FILES ${AWS_CRT_HEADERS} DESTINATION "include/aws/crt" COMPONENT Development)
-install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "include/aws/crt/auth" COMPONENT Development)
-install(FILES ${AWS_CRT_CHECKSUM_HEADERS} DESTINATION "include/aws/crt/checksum" COMPONENT Development)
-install(FILES ${AWS_CRT_CRYPTO_HEADERS} DESTINATION "include/aws/crt/crypto" COMPONENT Development)
-install(FILES ${AWS_CRT_IO_HEADERS} DESTINATION "include/aws/crt/io" COMPONENT Development)
-install(FILES ${AWS_CRT_IOT_HEADERS} DESTINATION "include/aws/iot" COMPONENT Development)
-install(FILES ${AWS_CRT_MQTT_HEADERS} DESTINATION "include/aws/crt/mqtt" COMPONENT Development)
-install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "include/aws/crt/http" COMPONENT Development)
-install(FILES ${AWS_CRT_ENDPOINT_HEADERS} DESTINATION "include/aws/crt/endpoints" COMPONENT Development)
-install(FILES ${AWS_CRT_CBOR_HEADERS} DESTINATION "include/aws/crt/cbor" COMPONENT Development)
+install(FILES ${AWS_CRT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt" COMPONENT Development)
+install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/auth" COMPONENT Development)
+install(FILES ${AWS_CRT_CHECKSUM_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/checksum" COMPONENT Development)
+install(FILES ${AWS_CRT_CRYPTO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/crypto" COMPONENT Development)
+install(FILES ${AWS_CRT_IO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/io" COMPONENT Development)
+install(FILES ${AWS_CRT_IOT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/iot" COMPONENT Development)
+install(FILES ${AWS_CRT_MQTT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/mqtt" COMPONENT Development)
+install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/http" COMPONENT Development)
+install(FILES ${AWS_CRT_ENDPOINT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/endpoints" COMPONENT Development)
+install(FILES ${AWS_CRT_CBOR_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/cbor" COMPONENT Development)
install(
TARGETS ${PROJECT_NAME}
--
2.46.0
+5 -9
View File
@@ -20,7 +20,7 @@
stdenv.mkDerivation rec {
pname = "aws-crt-cpp";
# nixpkgs-update: no auto update
version = "0.29.4";
version = "0.33.1";
outputs = [
"out"
@@ -31,17 +31,13 @@ stdenv.mkDerivation rec {
owner = "awslabs";
repo = "aws-crt-cpp";
rev = "v${version}";
sha256 = "sha256-Uv1BHM39f9soq7kziedqRhHqQ/xwnqcz++1UM5nuo8g=";
sha256 = "sha256-C8KWe5+CXujD8nN3gLkjaaMld15sat/ohwEKhyWELKI=";
};
patches = [
# Correct include path for split outputs.
# https://github.com/awslabs/aws-crt-cpp/pull/325
./0001-build-Make-includedir-properly-overrideable.patch
];
postPatch = ''
substituteInPlace CMakeLists.txt --replace '-Werror' ""
substituteInPlace CMakeLists.txt \
--replace-fail "$<INSTALL_INTERFACE:include>" "$<INSTALL_INTERFACE:$dev/include>" \
--replace-fail '-Werror' ""
'';
nativeBuildInputs = [
+2 -2
View File
@@ -33,13 +33,13 @@ in
stdenv.mkDerivation rec {
pname = "aws-sdk-cpp";
# nixpkgs-update: no auto update
version = "1.11.448";
version = "1.11.612";
src = fetchFromGitHub {
owner = "aws";
repo = "aws-sdk-cpp";
rev = version;
hash = "sha256-K0UFs7vOeZeQIs3G5L4FfEWXDGTXT9ssr/vQwa1l2lw=";
hash = "sha256-W4eKgUvN2NLYEOO47HTJYJpEmyn10gNK29RIrvoXkek=";
};
postPatch = ''
@@ -21,6 +21,7 @@
}@args:
assert (hash == null) -> (src != null);
let
atLeast24 = lib.versionAtLeast version "2.4";
atLeast224 = lib.versionAtLeast version "2.24pre";
atLeast225 = lib.versionAtLeast version "2.25pre";
in
@@ -75,7 +76,8 @@ in
withAWS ?
lib.meta.availableOn stdenv.hostPlatform aws-c-common
&& !enableStatic
&& (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin),
&& (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin)
&& atLeast24,
aws-c-common,
aws-sdk-cpp,
withLibseccomp ? lib.meta.availableOn stdenv.hostPlatform libseccomp,
@@ -29,11 +29,7 @@ let
stateDir
confDir
;
aws-sdk-cpp =
if lib.versionAtLeast args.version "2.12pre" then
nixDependencies.aws-sdk-cpp
else
nixDependencies.aws-sdk-cpp-old;
inherit (nixDependencies) aws-sdk-cpp;
};
# Called for Nix == 2.28. Transitional until we always use
@@ -9,65 +9,6 @@ regular@{
{
scopeFunction = scope: {
boehmgc = regular.boehmgc.override { enableLargeConfig = true; };
# old nix fails to build with newer aws-sdk-cpp and the patch doesn't apply
aws-sdk-cpp-old =
(regular.aws-sdk-cpp.override {
apis = [
"s3"
"transfer"
];
customMemoryManagement = false;
}).overrideAttrs
(args: rec {
# intentionally overriding postPatch
version = "1.9.294";
src = fetchFromGitHub {
owner = "aws";
repo = "aws-sdk-cpp";
rev = version;
hash = "sha256-Z1eRKW+8nVD53GkNyYlZjCcT74MqFqqRMeMc33eIQ9g=";
};
postPatch = ''
# Avoid blanket -Werror to evade build failures on less
# tested compilers.
substituteInPlace cmake/compiler_settings.cmake \
--replace '"-Werror"' ' '
# Missing includes for GCC11
sed '5i#include <thread>' -i \
aws-cpp-sdk-cloudfront-integration-tests/CloudfrontOperationTest.cpp \
aws-cpp-sdk-cognitoidentity-integration-tests/IdentityPoolOperationTest.cpp \
aws-cpp-sdk-dynamodb-integration-tests/TableOperationTest.cpp \
aws-cpp-sdk-elasticfilesystem-integration-tests/ElasticFileSystemTest.cpp \
aws-cpp-sdk-lambda-integration-tests/FunctionTest.cpp \
aws-cpp-sdk-mediastore-data-integration-tests/MediaStoreDataTest.cpp \
aws-cpp-sdk-queues/source/sqs/SQSQueue.cpp \
aws-cpp-sdk-redshift-integration-tests/RedshiftClientTest.cpp \
aws-cpp-sdk-s3-crt-integration-tests/BucketAndObjectOperationTest.cpp \
aws-cpp-sdk-s3-integration-tests/BucketAndObjectOperationTest.cpp \
aws-cpp-sdk-s3control-integration-tests/S3ControlTest.cpp \
aws-cpp-sdk-sqs-integration-tests/QueueOperationTest.cpp \
aws-cpp-sdk-transfer-tests/TransferTests.cpp
# Flaky on Hydra
rm aws-cpp-sdk-core-tests/aws/auth/AWSCredentialsProviderTest.cpp
# Includes aws-c-auth private headers, so only works with submodule build
rm aws-cpp-sdk-core-tests/aws/auth/AWSAuthSignerTest.cpp
# TestRandomURLMultiThreaded fails
rm aws-cpp-sdk-core-tests/http/HttpClientTest.cpp
''
+ lib.optionalString aws-sdk-cpp.stdenv.hostPlatform.isi686 ''
# EPSILON is exceeded
rm aws-cpp-sdk-core-tests/aws/client/AdaptiveRetryStrategyTest.cpp
'';
patches = (args.patches or [ ]) ++ [ ./patches/aws-sdk-cpp-TransferManager-ContentEncoding.patch ];
# only a stripped down version is build which takes a lot less resources to build
requiredSystemFeatures = [ ];
});
aws-sdk-cpp =
(regular.aws-sdk-cpp.override {
apis = [
@@ -1,127 +0,0 @@
From 7d58e303159b2fb343af9a1ec4512238efa147c7 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <edolstra@gmail.com>
Date: Mon, 6 Aug 2018 17:15:04 +0200
Subject: [PATCH] TransferManager: Allow setting a content-encoding for S3 uploads
--- a/aws-cpp-sdk-transfer/include/aws/transfer/TransferHandle.h
+++ b/aws-cpp-sdk-transfer/include/aws/transfer/TransferHandle.h
@@ -297,6 +297,14 @@ namespace Aws
* Content type of the object being transferred
*/
inline void SetContentType(const Aws::String& value) { std::lock_guard<std::mutex> locker(m_getterSetterLock); m_contentType = value; }
+ /**
+ * Content encoding of the object being transferred
+ */
+ inline const Aws::String GetContentEncoding() const { std::lock_guard<std::mutex> locker(m_getterSetterLock); return m_contentEncoding; }
+ /**
+ * Content type of the object being transferred
+ */
+ inline void SetContentEncoding(const Aws::String& value) { std::lock_guard<std::mutex> locker(m_getterSetterLock); m_contentEncoding = value; }
/**
* In case of an upload, this is the metadata that was placed on the object when it was uploaded.
* In the case of a download, this is the object metadata from the GetObject operation.
@@ -383,6 +391,7 @@ namespace Aws
Aws::String m_key;
Aws::String m_fileName;
Aws::String m_contentType;
+ Aws::String m_contentEncoding;
Aws::String m_versionId;
Aws::Map<Aws::String, Aws::String> m_metadata;
TransferStatus m_status;
--- a/aws-cpp-sdk-transfer/include/aws/transfer/TransferManager.h
+++ b/aws-cpp-sdk-transfer/include/aws/transfer/TransferManager.h
@@ -154,7 +154,8 @@ namespace Aws
const Aws::String& keyName,
const Aws::String& contentType,
const Aws::Map<Aws::String, Aws::String>& metadata,
- const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr);
+ const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr,
+ const Aws::String& contentEncoding = "");
/**
* Downloads the contents of bucketName/keyName in S3 to the file specified by writeToFile. This will perform a GetObject operation.
@@ -246,7 +247,8 @@ namespace Aws
const Aws::Map<Aws::String,
Aws::String>& metadata,
const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context,
- const Aws::String& fileName = "");
+ const Aws::String& fileName = "",
+ const Aws::String& contentEncoding = "");
/**
* Submits the actual task to task schecduler
@@ -262,7 +264,8 @@ namespace Aws
const Aws::String& keyName,
const Aws::String& contentType,
const Aws::Map<Aws::String, Aws::String>& metadata,
- const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context);
+ const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context,
+ const Aws::String& contentEncoding);
/**
* Uploads the contents of file, to bucketName/keyName in S3. contentType and metadata will be added to the object. If the object is larger than the configured bufferSize,
--- a/aws-cpp-sdk-transfer/source/transfer/TransferManager.cpp
+++ b/aws-cpp-sdk-transfer/source/transfer/TransferManager.cpp
@@ -87,9 +87,10 @@ namespace Aws
const Aws::String& bucketName,
const Aws::String& keyName, const Aws::String& contentType,
const Aws::Map<Aws::String, Aws::String>& metadata,
- const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context)
+ const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context,
+ const Aws::String& contentEncoding)
{
- return this->DoUploadFile(fileStream, bucketName, keyName, contentType, metadata, context);
+ return this->DoUploadFile(fileStream, bucketName, keyName, contentType, metadata, context, contentEncoding);
}
std::shared_ptr<TransferHandle> TransferManager::DownloadFile(const Aws::String& bucketName,
@@ -286,6 +287,9 @@ namespace Aws
createMultipartRequest.WithKey(handle->GetKey());
createMultipartRequest.WithMetadata(handle->GetMetadata());
+ if (handle->GetContentEncoding() != "")
+ createMultipartRequest.WithContentEncoding(handle->GetContentEncoding());
+
auto createMultipartResponse = m_transferConfig.s3Client->CreateMultipartUpload(createMultipartRequest);
if (createMultipartResponse.IsSuccess())
{
@@ -441,6 +445,9 @@ namespace Aws
putObjectRequest.SetContentType(handle->GetContentType());
+ if (handle->GetContentEncoding() != "")
+ putObjectRequest.SetContentEncoding(handle->GetContentEncoding());
+
auto buffer = m_bufferManager.Acquire();
auto lengthToWrite = (std::min)(m_transferConfig.bufferSize, handle->GetBytesTotalSize());
@@ -1140,12 +1147,15 @@ namespace Aws
const Aws::String& contentType,
const Aws::Map<Aws::String, Aws::String>& metadata,
const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context,
- const Aws::String& fileName)
+ const Aws::String& fileName,
+ const Aws::String& contentEncoding)
{
auto handle = Aws::MakeShared<TransferHandle>(CLASS_TAG, bucketName, keyName, 0, fileName);
handle->SetContentType(contentType);
handle->SetMetadata(metadata);
handle->SetContext(context);
+ if (contentEncoding != "")
+ handle->SetContentEncoding(contentEncoding);
if (!fileStream->good())
{
@@ -1213,9 +1223,10 @@ namespace Aws
const Aws::String& keyName,
const Aws::String& contentType,
const Aws::Map<Aws::String, Aws::String>& metadata,
- const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context)
+ const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context,
+ const Aws::String& contentEncoding)
{
- auto handle = CreateUploadFileHandle(fileStream.get(), bucketName, keyName, contentType, metadata, context);
+ auto handle = CreateUploadFileHandle(fileStream.get(), bucketName, keyName, contentType, metadata, context, "", contentEncoding);
return SubmitUpload(handle, fileStream);
}