Comparing version 3.1.1 to 3.1.2
3.1.2 / 2015-10-26 | ||
================== | ||
* feat: support custom Content-Type | ||
3.1.1 / 2015-10-23 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -190,3 +190,5 @@ /**! | ||
if (params.content || params.stream) { | ||
copy(params.headers).to(headers); | ||
if ((params.content || params.stream) && !headers['Content-Type']) { | ||
if (params.mime && params.mime.indexOf('/') > 0) { | ||
@@ -197,15 +199,14 @@ headers['Content-Type'] = params.mime; | ||
} | ||
if (params.content) { | ||
headers['Content-Md5'] = crypto | ||
.createHash('md5') | ||
.update(params.content) | ||
.digest('base64'); | ||
if (!headers['Content-Length']) { | ||
headers['Content-Length'] = params.content.length; | ||
} | ||
} | ||
if (params.content) { | ||
headers['Content-Md5'] = crypto | ||
.createHash('md5') | ||
.update(params.content) | ||
.digest('base64'); | ||
if (!headers['Content-Length']) { | ||
headers['Content-Length'] = params.content.length; | ||
} | ||
} | ||
copy(params.headers).to(headers); | ||
var authResource = params.authResource || params.resource; | ||
@@ -212,0 +213,0 @@ headers.authorization = this.authorization(params.method, authResource, headers); |
{ | ||
"name": "ali-oss", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "aliyun oss(open storage service) node client", | ||
@@ -5,0 +5,0 @@ "main": "lib/client.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
99888