summaryrefslogtreecommitdiff
path: root/lib/_http_outgoing.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_http_outgoing.js')
-rw-r--r--lib/_http_outgoing.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js
index 6b1b8703f9..55a2f8bef3 100644
--- a/lib/_http_outgoing.js
+++ b/lib/_http_outgoing.js
@@ -101,7 +101,7 @@ function isContentDispositionField(s) {
return s.length === 19 && StringPrototypeToLowerCase(s) === 'content-disposition';
}
-function OutgoingMessage() {
+function OutgoingMessage(options) {
Stream.call(this);
// Queue that holds all currently pending data, until the response will be
@@ -149,7 +149,7 @@ function OutgoingMessage() {
this._onPendingData = nop;
this[kErrored] = null;
- this[kHighWaterMark] = getDefaultHighWaterMark();
+ this[kHighWaterMark] = options?.highWaterMark ?? getDefaultHighWaterMark();
}
ObjectSetPrototypeOf(OutgoingMessage.prototype, Stream.prototype);
ObjectSetPrototypeOf(OutgoingMessage, Stream);
@@ -1171,6 +1171,7 @@ function(err, event) {
};
module.exports = {
+ kHighWaterMark,
kUniqueHeaders,
parseUniqueHeadersOption,
validateHeaderName,