Fix http.ClientRequest crashes if end() was called twice

Fixes #1417.
Fixes #1223.
This commit is contained in:
koichik 2011-07-30 00:18:35 +09:00
parent 62aaf56d1b
commit bffb758243

View File

@ -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();
}