Skip to content

Commit

Permalink
Content-Type 不参与签名
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Mar 10, 2021
1 parent a5b2c51 commit e79acf9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/cos-js-sdk-v5.js
Original file line number Diff line number Diff line change
Expand Up @@ -2221,7 +2221,7 @@ base.init(COS, task);
advance.init(COS, task);

COS.getAuthorization = util.getAuth;
COS.version = '1.2.5';
COS.version = '1.2.6';

module.exports = COS;

Expand Down Expand Up @@ -7841,7 +7841,7 @@ function getAuthorizationAsync(params, callback) {

var headers = util.clone(params.Headers);
util.each(headers, function (v, k) {
(v === '' || ['content-type', 'cache-control', 'expires'].indexOf(k.toLowerCase())) && delete headers[k];
(v === '' || ['content-type', 'cache-control', 'expires'].indexOf(k.toLowerCase()) > -1) && delete headers[k];
});

// 获取凭证的回调,避免用户 callback 多次
Expand Down
2 changes: 1 addition & 1 deletion dist/cos-js-sdk-v5.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cos-js-sdk-v5",
"version": "1.2.5",
"version": "1.2.6",
"description": "JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)",
"main": "index.js",
"types": "types",
Expand Down
2 changes: 1 addition & 1 deletion src/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -3050,7 +3050,7 @@ function getAuthorizationAsync(params, callback) {

var headers = util.clone(params.Headers);
util.each(headers, function (v, k) {
(v === '' || ['content-type', 'cache-control', 'expires'].indexOf(k.toLowerCase())) && delete headers[k];
(v === '' || ['content-type', 'cache-control', 'expires'].indexOf(k.toLowerCase()) > -1) && delete headers[k];
});

// 获取凭证的回调,避免用户 callback 多次
Expand Down
2 changes: 1 addition & 1 deletion src/cos.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ base.init(COS, task);
advance.init(COS, task);

COS.getAuthorization = util.getAuth;
COS.version = '1.2.5';
COS.version = '1.2.6';

module.exports = COS;

0 comments on commit e79acf9

Please sign in to comment.