-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into day/TraceLogs
- Loading branch information
Showing
25 changed files
with
614 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.79 | ||
1.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Config/AWSChecksumsConfig.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// Copyright Amazon.com Inc. or its affiliates. | ||
// All Rights Reserved. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
import enum AWSSDKChecksums.AWSChecksumCalculationMode | ||
@_spi(FileBasedConfig) import AWSSDKCommon | ||
|
||
public enum AWSChecksumsConfig { | ||
static func requestChecksumCalculation( | ||
configValue: AWSChecksumCalculationMode?, | ||
profileName: String?, | ||
fileBasedConfig: FileBasedConfiguration | ||
) -> AWSChecksumCalculationMode { | ||
return FieldResolver( | ||
configValue: configValue, | ||
envVarName: "AWS_REQUEST_CHECKSUM_CALCULATION", | ||
configFieldName: "request_checksum_calculation", | ||
fileBasedConfig: fileBasedConfig, | ||
profileName: profileName, | ||
converter: { AWSChecksumCalculationMode(caseInsensitiveRawValue: $0) } | ||
).value ?? .whenSupported | ||
} | ||
|
||
static func responseChecksumValidation( | ||
configValue: AWSChecksumCalculationMode?, | ||
profileName: String?, | ||
fileBasedConfig: FileBasedConfiguration | ||
) -> AWSChecksumCalculationMode { | ||
return FieldResolver( | ||
configValue: configValue, | ||
envVarName: "AWS_RESPONSE_CHECKSUM_VALIDATION", | ||
configFieldName: "response_checksum_validation", | ||
fileBasedConfig: fileBasedConfig, | ||
profileName: profileName, | ||
converter: { AWSChecksumCalculationMode(caseInsensitiveRawValue: $0) } | ||
).value ?? .whenSupported | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.