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.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js
index e10f068f32..9477a9b7f7 100644
--- a/lib/_http_outgoing.js
+++ b/lib/_http_outgoing.js
@@ -112,7 +112,7 @@ Object.setPrototypeOf(OutgoingMessage.prototype, Stream.prototype);
Object.setPrototypeOf(OutgoingMessage, Stream);
Object.defineProperty(OutgoingMessage.prototype, 'writableFinished', {
- get: function() {
+ get() {
return (
this.finished &&
this.outputSize === 0 &&
@@ -121,6 +121,24 @@ Object.defineProperty(OutgoingMessage.prototype, 'writableFinished', {
}
});
+Object.defineProperty(OutgoingMessage.prototype, 'writableObjectMode', {
+ get() {
+ return false;
+ }
+});
+
+Object.defineProperty(OutgoingMessage.prototype, 'writableLength', {
+ get() {
+ return this.outputSize + (this.socket ? this.socket.writableLength : 0);
+ }
+});
+
+Object.defineProperty(OutgoingMessage.prototype, 'writableHighWaterMark', {
+ get() {
+ return this.socket ? this.socket.writableHighWaterMark : HIGH_WATER_MARK;
+ }
+});
+
Object.defineProperty(OutgoingMessage.prototype, '_headers', {
get: internalUtil.deprecate(function() {
return this.getHeaders();