diff options
author | koichik <koichik@improvement.jp> | 2011-07-29 18:49:48 +0400 |
---|---|---|
committer | koichik <koichik@improvement.jp> | 2011-07-29 19:47:17 +0400 |
commit | 62aaf56d1bf4819bf78ecb352092b625b9a4a0ea (patch) | |
tree | 1e51203c4416d04ac5c78f3dfb673c0b72bfac54 /lib | |
parent | 759fb36df33f3dd0fa85fe01fa7b260bd22be40f (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 e7e28e816c4..794af64e87a 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(); } |