Skip to content

Commit dd2cfec

Browse files
committed
reversing logic to check for chunked mode
1 parent 21ba933 commit dd2cfec

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/aws-cpp-sdk-core/include/smithy/client/AwsSmithyClientBase.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ namespace client
105105
Aws::MakeShared<ChecksumInterceptor>("AwsSmithyClientBase", *m_clientConfig),
106106
Aws::MakeShared<features::ChunkingInterceptor>("AwsSmithyClientBase", [this]() {
107107
Aws::Client::ClientConfiguration chunkingConfig = *m_clientConfig;
108-
chunkingConfig.httpClientChunkedMode = m_httpClient->IsDefaultAwsHttpClient() ? m_clientConfig->httpClientChunkedMode : Aws::Client::HttpClientChunkedMode::CLIENT_IMPLEMENTATION;
108+
chunkingConfig.httpClientChunkedMode = m_httpClient->IsDefaultAwsHttpClient() ?
109+
Aws::Client::HttpClientChunkedMode::DEFAULT : m_clientConfig->httpClientChunkedMode;
109110
return chunkingConfig;
110111
}())
111112
})

src/aws-cpp-sdk-core/source/client/AWSClient.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ AWSClient::AWSClient(const Aws::Client::ClientConfiguration& configuration,
142142
m_userAgentInterceptor{Aws::MakeShared<smithy::client::UserAgentInterceptor>(AWS_CLIENT_LOG_TAG, configuration, m_retryStrategy->GetStrategyName(), m_serviceName)},
143143
m_interceptors{Aws::MakeShared<smithy::client::ChecksumInterceptor>(AWS_CLIENT_LOG_TAG), Aws::MakeShared<smithy::client::features::ChunkingInterceptor>(AWS_CLIENT_LOG_TAG, [&configuration, this]() {
144144
ClientConfiguration chunkingConfig = configuration;
145-
chunkingConfig.httpClientChunkedMode = m_httpClient->IsDefaultAwsHttpClient() ? configuration.httpClientChunkedMode : Aws::Client::HttpClientChunkedMode::CLIENT_IMPLEMENTATION;
145+
chunkingConfig.httpClientChunkedMode = m_httpClient->IsDefaultAwsHttpClient() ?
146+
Aws::Client::HttpClientChunkedMode::DEFAULT : configuration.httpClientChunkedMode;
146147
return chunkingConfig;
147148
}()), m_userAgentInterceptor}
148149
{
@@ -172,7 +173,8 @@ AWSClient::AWSClient(const Aws::Client::ClientConfiguration& configuration,
172173
m_userAgentInterceptor{Aws::MakeShared<smithy::client::UserAgentInterceptor>(AWS_CLIENT_LOG_TAG, configuration, m_retryStrategy->GetStrategyName(), m_serviceName)},
173174
m_interceptors{Aws::MakeShared<smithy::client::ChecksumInterceptor>(AWS_CLIENT_LOG_TAG, configuration), Aws::MakeShared<smithy::client::features::ChunkingInterceptor>(AWS_CLIENT_LOG_TAG, [&configuration, this]() {
174175
ClientConfiguration chunkingConfig = configuration;
175-
chunkingConfig.httpClientChunkedMode = m_httpClient->IsDefaultAwsHttpClient() ? configuration.httpClientChunkedMode : Aws::Client::HttpClientChunkedMode::CLIENT_IMPLEMENTATION;
176+
chunkingConfig.httpClientChunkedMode = m_httpClient->IsDefaultAwsHttpClient() ?
177+
Aws::Client::HttpClientChunkedMode::DEFAULT : configuration.httpClientChunkedMode;
176178
return chunkingConfig;
177179
}()), m_userAgentInterceptor}
178180
{

src/aws-cpp-sdk-core/source/smithy/client/AwsSmithyClientBase.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ void AwsSmithyClientBase::baseCopyAssign(const AwsSmithyClientBase& other,
108108
Aws::MakeShared<ChecksumInterceptor>("AwsSmithyClientBase", *m_clientConfig),
109109
Aws::MakeShared<features::ChunkingInterceptor>("AwsSmithyClientBase", [this]() {
110110
Aws::Client::ClientConfiguration chunkingConfig = *m_clientConfig;
111-
chunkingConfig.httpClientChunkedMode = m_httpClient->IsDefaultAwsHttpClient() ? m_clientConfig->httpClientChunkedMode : Aws::Client::HttpClientChunkedMode::CLIENT_IMPLEMENTATION;
111+
chunkingConfig.httpClientChunkedMode = m_httpClient->IsDefaultAwsHttpClient() ?
112+
Aws::Client::HttpClientChunkedMode::DEFAULT : m_clientConfig->httpClientChunkedMode;
112113
return chunkingConfig;
113114
}())
114115
};

0 commit comments

Comments
 (0)