diff options
author | Calvin Metcalf <cmetcalf@appgeo.com> | 2017-05-16 11:08:49 -0400 |
---|---|---|
committer | Matteo Collina <hello@matteocollina.com> | 2017-12-15 23:05:45 +0100 |
commit | e20af3371bb1f0ee16795528cbcbc674408842cb (patch) | |
tree | 0a0426a7c304adcf9b0bfc9c0e3e7c1a762a8fd3 /lib/_http_server.js | |
parent | 31addac8bbcd3e0a8cefba8327cfcc7fd9bdeb68 (diff) | |
download | android-node-v8-e20af3371bb1f0ee16795528cbcbc674408842cb.tar.gz android-node-v8-e20af3371bb1f0ee16795528cbcbc674408842cb.tar.bz2 android-node-v8-e20af3371bb1f0ee16795528cbcbc674408842cb.zip |
stream: add flow and buffer properties to streams
This adds computed properties to readable and writable streams to
allow access to the readable buffer, the writable buffer, and flow
state without accessing the readable or writable state.
These are the only uses of readable and writable state in the docs
so adding these work arounds allows them to be removed from the docs.
This also updates net, http_client and http_server to use the new
methods instead of manipulating readable and writable state directly.
See: https://github.com/nodejs/node/issues/445
PR-URL: https://github.com/nodejs/node/pull/12855
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/_http_server.js')
-rw-r--r-- | lib/_http_server.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/_http_server.js b/lib/_http_server.js index a1cbb63c1d..cab4824501 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -502,9 +502,7 @@ function onParserExecuteCommon(server, socket, parser, state, ret, d) { debug('SERVER have listener for %s', eventName); var bodyHead = d.slice(bytesParsed, d.length); - // TODO(isaacs): Need a way to reset a stream to fresh state - // IE, not flowing, and not explicitly paused. - socket._readableState.flowing = null; + socket.readableFlowing = null; server.emit(eventName, req, socket, bodyHead); } else { // Got upgrade header or CONNECT method, but have no handler. |