Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkoichik <koichik@improvement.jp>2011-07-29 18:49:48 +0400
committerkoichik <koichik@improvement.jp>2011-07-29 19:07:37 +0400
commit8b3ba47f88e5f59256818e3173c75c66ff5a82df (patch)
tree94e24965b86311e62e3c48d5a27b6d6b279d2b8e /lib
parenteab8bebcedd2d6ae46a25166964974bca263e616 (diff)
Fix http.ClientRequest crashes if end() was called twice
Fixes #1417. Fixes #1223.
Diffstat (limited to 'lib')
-rw-r--r--lib/http.js3
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();
}