diff options
Diffstat (limited to 'lib/_http_outgoing.js')
-rw-r--r-- | lib/_http_outgoing.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index a4a2b3ab14..ef7c8c6577 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -109,6 +109,15 @@ function OutgoingMessage() { Object.setPrototypeOf(OutgoingMessage.prototype, Stream.prototype); Object.setPrototypeOf(OutgoingMessage, Stream); +Object.defineProperty(OutgoingMessage.prototype, 'writableFinished', { + get: function() { + return ( + this.finished && + this.outputSize === 0 && + (!this.socket || this.socket.writableLength === 0) + ); + } +}); Object.defineProperty(OutgoingMessage.prototype, '_headers', { get: internalUtil.deprecate(function() { |