diff options
author | isaacs <i@izs.me> | 2013-06-26 09:13:48 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-07-08 09:20:40 -0700 |
commit | 99a7e78e7789a1a0de31c493605abf0a0f35312a (patch) | |
tree | 9c20974d31a814a93c1edf75ecbeb1739166d274 /lib | |
parent | 2d6d46172ed1d32ab0d6cad9cc5caea96bf06fac (diff) | |
download | node-new-99a7e78e7789a1a0de31c493605abf0a0f35312a.tar.gz |
http: Dump response when request is aborted
Fixes #5695
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/http.js b/lib/http.js index 2dc1dabb0b..7527fde1ad 100644 --- a/lib/http.js +++ b/lib/http.js @@ -1429,6 +1429,14 @@ ClientRequest.prototype._implicitHeader = function() { }; ClientRequest.prototype.abort = function() { + // If we're aborting, we don't care about any more response data. + if (this.res) + this.res._dump(); + else + this.once('response', function(res) { + res._dump(); + }); + if (this.socket) { // in-progress this.socket.destroy(); |