diff options
author | koichik <koichik@improvement.jp> | 2011-07-29 23:49:48 +0900 |
---|---|---|
committer | koichik <koichik@improvement.jp> | 2011-07-30 00:47:17 +0900 |
commit | 62aaf56d1bf4819bf78ecb352092b625b9a4a0ea (patch) | |
tree | 1e51203c4416d04ac5c78f3dfb673c0b72bfac54 /lib/http.js | |
parent | 759fb36df33f3dd0fa85fe01fa7b260bd22be40f (diff) | |
download | node-62aaf56d1bf4819bf78ecb352092b625b9a4a0ea.tar.gz |
Fix http.ClientRequest crashes if end() was called twice
Fixes #1417.
Fixes #1223.
Diffstat (limited to 'lib/http.js')
-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 e7e28e816..794af64e8 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(); } |