File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " cos-nodejs-sdk-v5" ,
3- "version" : " 2.15.0" ,
3+ "version" : " 2.15.0-beta.1 " ,
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 @@ -3993,8 +3993,8 @@ function submitRequest(params, callback) {
39933993 var Query = util . clone ( params . qs ) ;
39943994 params . action && ( Query [ params . action ] = '' ) ;
39953995
3996- var contentType = '' ;
3997- var contentLength = '' ;
3996+ var contentType ;
3997+ var contentLength = 0 ;
39983998 // 指定一个默认的 content-type
39993999 var defaultContentType = 'text/plain' ;
40004000 util . each ( params . headers , function ( value , key ) {
@@ -4023,7 +4023,7 @@ function submitRequest(params, callback) {
40234023 }
40244024 }
40254025 // 上传接口补充默认 content-type
4026- if ( ! contentType && body ) {
4026+ if ( contentType === undefined && body ) {
40274027 var defaultContentType = 'application/octet-stream' ;
40284028 if ( body . type ) {
40294029 params . headers [ 'Content-Type' ] = body . type ;
You can’t perform that action at this time.
0 commit comments