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 1
1
{
2
2
"name" : " cos-nodejs-sdk-v5" ,
3
- "version" : " 2.16.0-beta.4 " ,
3
+ "version" : " 2.16.0-beta.5 " ,
4
4
"description" : " cos nodejs sdk v5" ,
5
5
"main" : " index.js" ,
6
6
"types" : " index.d.ts" ,
Original file line number Diff line number Diff line change @@ -1617,9 +1617,11 @@ function downloadFile(params, callback) {
1617
1617
1618
1618
// 只校验文件大小和 crc64 是否有变更
1619
1619
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 ) {
1621
1621
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
+ }
1623
1625
// else if (data.ETag !== head.ETag) error = 'download error, ETag has changed.';
1624
1626
// else if (chunkHeaders['last-modified'] !== head.mtime) error = 'download error, Last-Modified has changed.';
1625
1627
Original file line number Diff line number Diff line change @@ -6181,8 +6181,7 @@ group('getObject() 手动关闭合并 Key 校验', function () {
6181
6181
} ,
6182
6182
function ( err , data ) {
6183
6183
console . log ( 'getObject Body1' , err || data ) ;
6184
- assert . ok ( data . Body . toString ( ) . includes ( 'ListBucketResult' ) ) ;
6185
- // assert.ok(err);
6184
+ assert . ok ( err ) ;
6186
6185
done ( ) ;
6187
6186
}
6188
6187
) ;
@@ -6200,8 +6199,7 @@ group('getObject() 手动关闭合并 Key 校验', function () {
6200
6199
} ,
6201
6200
function ( err , data ) {
6202
6201
console . log ( 'getObject Body3' , err || data ) ;
6203
- assert . ok ( data . Body . toString ( ) . includes ( 'ListBucketResult' ) ) ;
6204
- // assert.ok(err);
6202
+ assert . ok ( err ) ;
6205
6203
done ( ) ;
6206
6204
}
6207
6205
) ;
You can’t perform that action at this time.
0 commit comments