File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
services/s3/src/main/java/software/amazon/awssdk/services/s3/internal/presigner Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 90
90
import software .amazon .awssdk .services .s3 .transform .PutObjectRequestMarshaller ;
91
91
import software .amazon .awssdk .services .s3 .transform .UploadPartRequestMarshaller ;
92
92
import software .amazon .awssdk .utils .IoUtils ;
93
+ import software .amazon .awssdk .utils .Logger ;
93
94
import software .amazon .awssdk .utils .Validate ;
94
95
95
96
/**
96
97
* The default implementation of the {@link S3Presigner} interface.
97
98
*/
98
99
@ SdkInternalApi
99
100
public final class DefaultS3Presigner extends DefaultSdkPresigner implements S3Presigner {
101
+ private static final Logger log = Logger .loggerFor (DefaultS3Presigner .class );
102
+
100
103
private static final AwsS3V4Signer DEFAULT_SIGNER = AwsS3V4Signer .create ();
101
104
private static final S3Configuration DEFAULT_S3_CONFIGURATION = S3Configuration .builder ()
102
- .checksumValidationEnabled (false )
103
- .build ();
105
+ .checksumValidationEnabled (false )
106
+ .build ();
104
107
private static final String SERVICE_NAME = "s3" ;
105
108
private static final String SIGNING_NAME = "s3" ;
106
109
@@ -117,6 +120,11 @@ private DefaultS3Presigner(Builder b) {
117
120
super (b );
118
121
119
122
this .serviceConfiguration = b .serviceConfiguration != null ? b .serviceConfiguration : DEFAULT_S3_CONFIGURATION ;
123
+ if (serviceConfiguration .checksumValidationEnabled ()) {
124
+ log .debug (() -> "The provided S3Configuration has ChecksumValidationEnabled set to true. Please note that "
125
+ + "the pre-signed request can't be executed using a web browser if checksum validation is enabled." );
126
+ }
127
+
120
128
121
129
this .clientInterceptors = initializeInterceptors ();
122
130
You can’t perform that action at this time.
0 commit comments