diff options
Diffstat (limited to 'lib/http.js')
-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(); |