@@ -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
0 commit comments