Skip to content

Conversation

@sbiscigl
Copy link
Contributor

@sbiscigl sbiscigl commented Oct 15, 2025

Description of changes:

Fixes a bug where client configuration was not getting created correctly in the S3CrtClient causing inconsistencies between different constructors.

Specifically that on the constructor where a credentials provider was being provided, the incorrect call was being made, causing S3Crt specific config to be lost

i.e.

#include <aws/core/Aws.h>
#include <aws/core/utils/logging/LogLevel.h>
#include <aws/s3-crt/S3CrtClient.h>

int main() {
  Aws::SDKOptions sdk_options;
  sdk_options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Off;
  Aws::InitAPI(sdk_options);

  Aws::S3Crt::S3CrtClientConfiguration configuration{};
  configuration.contentLengthConfiguration = Aws::S3Crt::S3CrtClientConfiguration::CONTENT_LENGTH_CONFIGURATION::SKIP_CONTENT_LENGTH;
  Aws::S3Crt::S3CrtClientConfiguration copied{configuration, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy::Never};
  if (copied.contentLengthConfiguration != Aws::S3Crt::S3CrtClientConfiguration::CONTENT_LENGTH_CONFIGURATION::SKIP_CONTENT_LENGTH) {
    std::cout << "copied incorrectly!\n";
  }

  Aws::ShutdownAPI(sdk_options);
  return 0;
}

The impact of this was customers that set SKIP_CONTENT_LENGTH would not have it honored if they provided their own credentials provider.

Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sbiscigl sbiscigl marked this pull request as ready for review October 15, 2025 20:09
@sbiscigl sbiscigl merged commit 9c5c53f into main Oct 15, 2025
6 of 7 checks passed
@sbiscigl sbiscigl deleted the fix-crt-contructor branch October 15, 2025 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants