diff options
author | koichik <koichik@improvement.jp> | 2011-07-29 18:49:48 +0400 |
---|---|---|
committer | koichik <koichik@improvement.jp> | 2011-07-29 19:07:37 +0400 |
commit | 8b3ba47f88e5f59256818e3173c75c66ff5a82df (patch) | |
tree | 94e24965b86311e62e3c48d5a27b6d6b279d2b8e /lib | |
parent | eab8bebcedd2d6ae46a25166964974bca263e616 (diff) |
Fix http.ClientRequest crashes if end() was called twice
Fixes #1417.
Fixes #1223.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/http.js b/lib/http.js index e9e1f486f74..d532eddf0cc 100644 --- a/lib/http.js +++ b/lib/http.js @@ -648,6 +648,9 @@ OutgoingMessage.prototype.addTrailers = function(headers) { OutgoingMessage.prototype.end = function(data, encoding) { + if (this.finished) { + return false; + } if (!this._header) { this._implicitHeader(); } |