Comparing version 3.1.4 to 3.1.5
3.1.5 / 2016-03-08 | ||
================== | ||
* fix: replace %20 to + | ||
3.1.4 / 2016-01-26 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -271,11 +271,12 @@ /** | ||
resource = resource || ''; | ||
var parsed = url.parse(resource); | ||
if (!parsed.pathname) { | ||
return resource; | ||
let split = resource.indexOf('?'); | ||
var pathname = resource; | ||
var query = ''; | ||
if (split !== -1) { | ||
pathname = resource.slice(0, split); | ||
query = resource.slice(split); | ||
} | ||
parsed.pathname = parsed.pathname.split('/').map(function (p) { | ||
return encodeURIComponent(p); | ||
}).join('/'); | ||
return url.format(parsed); | ||
// need remain '/' | ||
// oss don't support %20, use '+' | ||
return encodeURIComponent(pathname).replace(/%2F/g, '/').replace(/%20/g, '+') + query; | ||
}; | ||
@@ -282,0 +283,0 @@ |
{ | ||
"name": "ali-oss", | ||
"version": "3.1.4", | ||
"version": "3.1.5", | ||
"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
100422
1353