Fix http.ClientRequest crashes if end() was called twice
Fixes #1417. Fixes #1223.
This commit is contained in:
parent
62aaf56d1b
commit
bffb758243
@ -648,6 +648,9 @@ OutgoingMessage.prototype.addTrailers = function(headers) {
|
|||||||
|
|
||||||
|
|
||||||
OutgoingMessage.prototype.end = function(data, encoding) {
|
OutgoingMessage.prototype.end = function(data, encoding) {
|
||||||
|
if (this.finished) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!this._header) {
|
if (!this._header) {
|
||||||
this._implicitHeader();
|
this._implicitHeader();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user