File tree Expand file tree Collapse file tree 4 files changed +33
-6
lines changed Expand file tree Collapse file tree 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, {
453453 willComputeChecksums : function willComputeChecksums ( req ) {
454454 var rules = req . service . api . operations [ req . operation ] . input . members ;
455455 var body = req . httpRequest . body ;
456- var needsContentMD5 = rules . ContentMD5 &&
456+ var needsContentMD5 = req . service . config . computeChecksums &&
457+ rules . ContentMD5 &&
457458 ! req . params . ContentMD5 &&
458459 body &&
459460 ( 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 = {
4141 262 ,
4242 275 ,
4343 281 ,
44- 640 ,
45- 642 ,
46- 761 ,
47- 772 ,
44+ 641 ,
45+ 643 ,
46+ 762 ,
4847 773 ,
4948 774 ,
50- 779
49+ 775 ,
50+ 780 ,
5151 ]
5252} ;
5353
Original file line number Diff line number Diff line change @@ -2544,6 +2544,27 @@ describe('AWS.S3', function() {
25442544 }
25452545 } ;
25462546
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+
25472568 if ( AWS . util . isNode ( ) ) {
25482569 it ( 'does not compute checksums for Stream objects' , function ( ) {
25492570 s3 = new AWS . S3 ( {
You can’t perform that action at this time.
0 commit comments