Skip to content

Commit

Permalink
fix http OutgoingMessage _implicitHeader method override error
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcanaltin committed Apr 22, 2023
1 parent 6deab3e commit 4009aca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/_http_outgoing.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ const {
ERR_INVALID_ARG_TYPE,
ERR_INVALID_ARG_VALUE,
ERR_INVALID_CHAR,
ERR_STREAM_CANNOT_PIPE,
ERR_STREAM_ALREADY_FINISHED,
ERR_STREAM_WRITE_AFTER_END,
ERR_STREAM_NULL_VALUES,
ERR_STREAM_DESTROYED,
},
Expand Down Expand Up @@ -373,6 +370,9 @@ OutgoingMessage.prototype._send = function _send(data, encoding, callback, byteL
}
this._headerSent = true;
}
if (!this._headersSent) {
this._implicitHeader();
}
return this._writeRaw(data, encoding, callback, byteLength);
};

Expand Down

0 comments on commit 4009aca

Please sign in to comment.