File tree 4 files changed +33
-6
lines changed
4 files changed +33
-6
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "type" : " bugfix" ,
3
+ "category" : " S3" ,
4
+ "description" : " Fixed a bug that S3 client no longer honor the computeChecksums config introduced in #3799. Previously only the members with httpChecksumRequired trait will be disabled by unseting computeChecksums config. S3 doesn't not honor the config because it has its own logic handling MD5 chechsums."
5
+ }
Original file line number Diff line number Diff line change @@ -453,7 +453,8 @@ AWS.util.update(AWS.S3.prototype, {
453
453
willComputeChecksums : function willComputeChecksums ( req ) {
454
454
var rules = req . service . api . operations [ req . operation ] . input . members ;
455
455
var body = req . httpRequest . body ;
456
- var needsContentMD5 = rules . ContentMD5 &&
456
+ var needsContentMD5 = req . service . config . computeChecksums &&
457
+ rules . ContentMD5 &&
457
458
! req . params . ContentMD5 &&
458
459
body &&
459
460
( AWS . util . Buffer . isBuffer ( req . httpRequest . body ) || typeof req . httpRequest . body === 'string' ) ;
Original file line number Diff line number Diff line change @@ -41,13 +41,13 @@ var allowlist = {
41
41
262 ,
42
42
275 ,
43
43
281 ,
44
- 640 ,
45
- 642 ,
46
- 761 ,
47
- 772 ,
44
+ 641 ,
45
+ 643 ,
46
+ 762 ,
48
47
773 ,
49
48
774 ,
50
- 779
49
+ 775 ,
50
+ 780 ,
51
51
]
52
52
} ;
53
53
Original file line number Diff line number Diff line change @@ -2544,6 +2544,27 @@ describe('AWS.S3', function() {
2544
2544
}
2545
2545
} ;
2546
2546
2547
+ it ( 'does not compute checksums if computeChecksums is off' , function ( ) {
2548
+ willCompute ( 'putObject' , {
2549
+ computeChecksums : false ,
2550
+ hash : null
2551
+ } ) ;
2552
+ } ) ;
2553
+
2554
+ it ( 'does not compute checksums if computeChecksums is on and ContentMD5 is provided' , function ( ) {
2555
+ willCompute ( 'putBucketAcl' , {
2556
+ computeChecksums : true ,
2557
+ hash : '000'
2558
+ } ) ;
2559
+ } ) ;
2560
+
2561
+ it ( 'computes checksums if computeChecksums is on and ContentMD5 is not provided' , function ( ) {
2562
+ willCompute ( 'putBucketAcl' , {
2563
+ computeChecksums : true ,
2564
+ hash : '1B2M2Y8AsgTpgAmY7PhCfg=='
2565
+ } ) ;
2566
+ } ) ;
2567
+
2547
2568
if ( AWS . util . isNode ( ) ) {
2548
2569
it ( 'does not compute checksums for Stream objects' , function ( ) {
2549
2570
s3 = new AWS . S3 ( {
You can’t perform that action at this time.
0 commit comments