Comparing version 6.0.0 to 6.0.1
@@ -5,2 +5,10 @@ # Change Log | ||
<a name="6.0.1"></a> | ||
## [6.0.1](https://github.com/aliyun/oss-nodejs-sdk/compare/v5.1.0...v6.0.1) (2018-07-17) | ||
### Bug Fixes | ||
* should consume the response stream on error ([#503](https://github.com/aliyun/oss-nodejs-sdk/issues/503)) ([14e4038](https://github.com/aliyun/oss-nodejs-sdk/commit/14e4038)) | ||
<a name="6.0.0"></a> | ||
@@ -21,2 +29,11 @@ # [6.0.0](https://github.com/aliyun/oss-nodejs-sdk/compare/v5.3.1...v6.0.0) (2018-07-10) | ||
<a name="5.3.2"></a> | ||
## [5.3.2](https://github.com/aliyun/oss-nodejs-sdk/compare/v5.1.0...v5.3.2) (2018-07-17) | ||
### Bug Fixes | ||
* should consume the response stream on error ([#503](https://github.com/aliyun/oss-nodejs-sdk/issues/503)) ([14e4038](https://github.com/aliyun/oss-nodejs-sdk/commit/14e4038)) | ||
<a name="5.3.1"></a> | ||
@@ -23,0 +40,0 @@ # [5.3.1](https://github.com/aliyun/oss-nodejs-sdk/compare/v5.1.0...v5.3.1) (2018-06-27) |
@@ -1,1 +0,1 @@ | ||
exports.version="6.0.0" | ||
exports.version="6.0.1" |
const debug = require('debug')('ali-oss'); | ||
const sendToWormhole = require('stream-wormhole'); | ||
const crypto = require('crypto'); | ||
@@ -10,2 +11,3 @@ const path = require('path'); | ||
const AgentKeepalive = require('agentkeepalive'); | ||
const HttpsAgentKeepalive = require('agentkeepalive').HttpsAgent; | ||
const merge = require('merge-descriptors'); | ||
@@ -24,2 +26,3 @@ const urlutil = require('url'); | ||
const globalHttpAgent = new AgentKeepalive(); | ||
const globalHttpsAgent = new HttpsAgentKeepalive(); | ||
@@ -73,2 +76,3 @@ function getHeader(headers, name) { | ||
this.agent = this.options.agent || globalHttpAgent; | ||
this.httpsAgent = this.options.httpsAgent || globalHttpsAgent; | ||
} | ||
@@ -260,3 +264,2 @@ this.ctx = ctx; | ||
const reqParams = { | ||
agent: this.agent, | ||
method: params.method, | ||
@@ -271,2 +274,8 @@ content: params.content, | ||
}; | ||
if (this.agent) { | ||
reqParams.agent = this.agent; | ||
} | ||
if (this.httpsAgent) { | ||
reqParams.httpsAgent = this.httpsAgent; | ||
} | ||
@@ -317,2 +326,6 @@ return { | ||
if (err) { | ||
if (params.customResponse && result && result.res) { | ||
// consume the response stream | ||
await sendToWormhole(result.res); | ||
} | ||
throw err; | ||
@@ -319,0 +332,0 @@ } |
{ | ||
"name": "ali-oss", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"description": "aliyun oss(object storage service) node client", | ||
@@ -103,3 +103,4 @@ "main": "lib/client.js", | ||
"address": "^1.0.0", | ||
"agentkeepalive": "^2.1.1", | ||
"agentkeepalive": "^3.4.1", | ||
"any-promise": "^1.3.0", | ||
"bowser": "^1.6.0", | ||
@@ -118,10 +119,11 @@ "co-defer": "^1.0.0", | ||
"mime": "^1.3.4", | ||
"mz-modules": "^2.1.0", | ||
"platform": "^1.3.1", | ||
"sdk-base": "^2.0.1", | ||
"stream-http": "2.8.2", | ||
"stream-wormhole": "^1.0.4", | ||
"urllib": "^2.17.1", | ||
"utility": "^1.8.0", | ||
"xml2js": "^0.4.16", | ||
"stream-http": "2.8.2", | ||
"any-promise": "^1.3.0" | ||
"xml2js": "^0.4.16" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
3027101
35163
24
+ Addedmz-modules@^2.1.0
+ Addedstream-wormhole@^1.0.4
+ Addedagentkeepalive@3.5.3(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedko-sleep@1.1.4(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedmz-modules@2.1.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedstream-wormhole@1.1.0(transitive)
- Removedagentkeepalive@2.2.0(transitive)
Updatedagentkeepalive@^3.4.1