File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " cos-nodejs-sdk-v5" ,
3- "version" : " 2.16.0-beta.4 " ,
3+ "version" : " 2.16.0-beta.5 " ,
44 "description" : " cos nodejs sdk v5" ,
55 "main" : " index.js" ,
66 "types" : " index.d.ts" ,
Original file line number Diff line number Diff line change @@ -1617,9 +1617,11 @@ function downloadFile(params, callback) {
16171617
16181618 // 只校验文件大小和 crc64 是否有变更
16191619 var changed ;
1620- if ( chunkHeaders [ 'x-cos-hash-crc64ecma' ] !== head . crc64ecma )
1620+ if ( chunkHeaders [ 'x-cos-hash-crc64ecma' ] && head . crc64ecma && chunkHeaders [ 'x-cos-hash-crc64ecma' ] !== head . crc64ecma ) {
16211621 changed = 'download error, x-cos-hash-crc64ecma has changed.' ;
1622- else if ( totalSize !== head . size ) changed = 'download error, Last-Modified has changed.' ;
1622+ } else if ( totalSize !== head . size ) {
1623+ changed = 'download error, Last-Modified has changed.' ;
1624+ }
16231625 // else if (data.ETag !== head.ETag) error = 'download error, ETag has changed.';
16241626 // else if (chunkHeaders['last-modified'] !== head.mtime) error = 'download error, Last-Modified has changed.';
16251627
Original file line number Diff line number Diff line change @@ -6181,8 +6181,7 @@ group('getObject() 手动关闭合并 Key 校验', function () {
61816181 } ,
61826182 function ( err , data ) {
61836183 console . log ( 'getObject Body1' , err || data ) ;
6184- assert . ok ( data . Body . toString ( ) . includes ( 'ListBucketResult' ) ) ;
6185- // assert.ok(err);
6184+ assert . ok ( err ) ;
61866185 done ( ) ;
61876186 }
61886187 ) ;
@@ -6200,8 +6199,7 @@ group('getObject() 手动关闭合并 Key 校验', function () {
62006199 } ,
62016200 function ( err , data ) {
62026201 console . log ( 'getObject Body3' , err || data ) ;
6203- assert . ok ( data . Body . toString ( ) . includes ( 'ListBucketResult' ) ) ;
6204- // assert.ok(err);
6202+ assert . ok ( err ) ;
62056203 done ( ) ;
62066204 }
62076205 ) ;
You can’t perform that action at this time.
0 commit comments