Comparing version 4.11.0 to 4.11.1
4.11.1 / 2017-11-07 | ||
================== | ||
**fixes** | ||
* [[`029dcc2`](http://github.com/ali-sdk/ali-oss/commit/029dcc2374c1d4cbb1589a4b15bae1d3057228e0)] - fix: process the client's local time is skew (#314) (饶培泽 <<peizerao@gmail.com>>) | ||
4.11.0 / 2017-10-25 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -49,2 +49,5 @@ 'use strict'; | ||
this.userAgent = this._getUserAgent(); | ||
// record the time difference between client and server | ||
this.amendTimeSkewed = 0; | ||
} | ||
@@ -229,3 +232,3 @@ | ||
var headers = { | ||
'x-oss-date': dateFormat(new Date(), 'UTC:ddd, dd mmm yyyy HH:MM:ss \'GMT\''), | ||
'x-oss-date': dateFormat(+new Date() + this.amendTimeSkewed, 'UTC:ddd, dd mmm yyyy HH:MM:ss \'GMT\''), | ||
'x-oss-user-agent': this.userAgent, | ||
@@ -313,2 +316,6 @@ 'User-Agent': this.userAgent | ||
var err = yield* this.requestError(result); | ||
if (err.code === 'RequestTimeTooSkewed') { | ||
this.amendTimeSkewed = +new Date(err.serverTime) - new Date() | ||
return yield* this.request(params); | ||
} | ||
err.params = params; | ||
@@ -488,2 +495,3 @@ throw err; | ||
err.hostId = info.HostId; | ||
err.serverTime = info.ServerTime; | ||
} | ||
@@ -490,0 +498,0 @@ |
{ | ||
"name": "ali-oss", | ||
"version": "4.11.0", | ||
"version": "4.11.1", | ||
"description": "aliyun oss(object storage service) node client", | ||
@@ -85,2 +85,3 @@ "main": "lib/client.js", | ||
"thunk-mocha": "^1.0.3", | ||
"timemachine": "^0.3.0", | ||
"uglify-js": "^2.8.29", | ||
@@ -87,0 +88,0 @@ "watchify": "^3.9.0" |
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
260406
4745
33