Skip to content

Commit e2ee584

Browse files
committed
Review comments
1 parent 8e9975d commit e2ee584

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

core/http-auth-aws/src/test/java/software/amazon/awssdk/http/auth/aws/crt/internal/signer/DefaultAwsCrtV4aHttpSignerTest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,9 @@ void sign_withProvidedHostHeader_shouldRespectUserHostHeader() {
446446

447447
@Test
448448
@Disabled("Broken - We don't pass x-amz-content-sha256 to CRT signer")
449-
// This is currently broken because we don't preserve the 'x-amz-content-sha256' header when sending to CRT to sign:
449+
// TODO: This is currently broken because we don't preserve the 'x-amz-content-sha256' header when sending to CRT to sign:
450450
// https://github.com/aws/aws-sdk-java-v2/blob/59e3a000503e1299675698e5c4c7af51f2525669/core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/crt/internal/util/CrtUtils.java#L45
451+
// Refer to JAVA-8531
451452
void sign_WithPayloadSigningTrue_chunkEncodingFalse_cacheContainsChecksum_usesCachedValue() {
452453
PayloadChecksumStore cache = PayloadChecksumStore.create();
453454

@@ -545,9 +546,6 @@ void sign_withPayloadSigningTrue_chunkEncodingFalse_withChecksum_cacheContainsCr
545546
byte[] crc32Value = "my-crc32-checksum".getBytes(StandardCharsets.UTF_8);
546547
cache.putChecksumValue(CRC32, crc32Value);
547548

548-
// byte[] sha256Value = "my-sha256-checksum".getBytes(StandardCharsets.UTF_8);
549-
// cache.putChecksumValue(SHA256, sha256Value);
550-
551549
SignRequest<? extends AwsCredentialsIdentity> request = generateBasicRequest(
552550
AwsCredentialsIdentity.create("access", "secret"),
553551
httpRequest -> httpRequest.uri(URI.create("http://demo.us-east-1.amazonaws.com")),
@@ -562,7 +560,6 @@ void sign_withPayloadSigningTrue_chunkEncodingFalse_withChecksum_cacheContainsCr
562560

563561
SdkHttpRequest httpRequest = signedRequest.request();
564562

565-
// assertThat(httpRequest.firstMatchingHeader("x-amz-content-sha256")).hasValue(BinaryUtils.toHex(sha256Value));
566563
assertThat(httpRequest.firstMatchingHeader("x-amz-checksum-crc32")).hasValue(BinaryUtils.toBase64(crc32Value));
567564
}
568565

services/s3/src/test/java/software/amazon/awssdk/services/s3/checksums/ChecksumReuseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public void abort() {
134134
}
135135

136136
/**
137-
* A stream that randomly returns other 'a' or 'b' from each read() invocation.
137+
* A stream that randomly returns either 'a' or 'b' from each read() invocation.
138138
*/
139139
private static class RandomInputStream extends InputStream {
140140
private final Random rng = new Random();

0 commit comments

Comments
 (0)