File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -432,12 +432,13 @@ public static boolean skipMd5CheckPerResponse(ObjectMetadata metadata) {
432
432
/**
433
433
* Based on the given request object, returns whether the specified request
434
434
* should skip MD5 check on the requested object content. Specifically, MD5
435
- * check should be skipped if one of the following condition is true:
435
+ * check should be skipped if one of the following conditions are true:
436
436
* <ol>
437
437
* <li>The system property
438
438
*
439
439
* <pre>
440
440
* -Dcom.amazonaws.services.s3.disableGetObjectMD5Validation
441
+ * -Dcom.amazonaws.services.s3.disablePutObjectMD5Validation
441
442
* </pre>
442
443
*
443
444
* is specified;</li>
@@ -460,10 +461,14 @@ public static boolean skipMd5CheckPerRequest(AmazonWebServiceRequest request) {
460
461
if (getObjectRequest .getSSECustomerKey () != null )
461
462
return true ;
462
463
} else if (request instanceof PutObjectRequest ) {
464
+ if (System .getProperty ("com.amazonaws.services.s3.disablePutObjectMD5Validation" ) != null )
465
+ return true ;
463
466
PutObjectRequest putObjectRequest = (PutObjectRequest )request ;
464
467
return putObjectRequest .getSSECustomerKey () != null
465
468
|| putObjectRequest .getSSEAwsKeyManagementParams () != null ;
466
469
} else if (request instanceof UploadPartRequest ) {
470
+ if (System .getProperty ("com.amazonaws.services.s3.disablePutObjectMD5Validation" ) != null )
471
+ return true ;
467
472
UploadPartRequest uploadPartRequest = (UploadPartRequest )request ;
468
473
return uploadPartRequest .getSSECustomerKey () != null ;
469
474
}
You can’t perform that action at this time.
0 commit comments