diff options
author | Roee Kasher <roee@fire.glass> | 2017-06-30 23:45:12 +0300 |
---|---|---|
committer | Matteo Collina <hello@matteocollina.com> | 2017-07-17 18:19:41 +0200 |
commit | 649d77bbf4e01e3dd3799ff8ca8d190641c9f4da (patch) | |
tree | 9039208e6fb5822cf28922e6e0a028fd659f6140 /lib/_http_outgoing.js | |
parent | 7ae23feb61d82c440483e928f9c2bba34e0ec88a (diff) | |
download | android-node-v8-649d77bbf4e01e3dd3799ff8ca8d190641c9f4da.tar.gz android-node-v8-649d77bbf4e01e3dd3799ff8ca8d190641c9f4da.tar.bz2 android-node-v8-649d77bbf4e01e3dd3799ff8ca8d190641c9f4da.zip |
http: OutgoingMessage change writable after end
When an OutgoingMessage is closed (for example, using the `end`
method), its 'writable' property should be changed to false - since it
is not writable anymore. The 'writable' property should have the
opposite value of the 'finished' property.
PR-URL: https://github.com/nodejs/node/pull/14024
Fixes: https://github.com/nodejs/node/issues/14023
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'lib/_http_outgoing.js')
-rw-r--r-- | lib/_http_outgoing.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index ccb66f742f..8402bd2b61 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -793,6 +793,7 @@ OutgoingMessage.prototype.end = function end(chunk, encoding, callback) { this.connection.uncork(); this.finished = true; + this.writable = false; // There is the first message on the outgoing queue, and we've sent // everything to the socket. |