0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib
isaacs 14e8f806de stream: Properly handle large reads from push-streams
Problem 1: If stream.push() triggers a 'readable' event, and the user
calls `read(n)` with some n > the highWaterMark, then the push() will
return false (indicating that they should not push any more), but no
future 'readable' event is coming (because we're above the
highWaterMark).

Solution: return true from push() when needReadable is set.

Problem 2: A read(n) for n != 0, after the stream had encountered an
EOF, would not trigger the 'end' event if the EOF was pushed in
synchronously by the _read() function.

Solution: Check for ended in stream.read() and schedule an end event if
the length now equals 0.

Fix #4585
2013-01-16 10:45:11 -08:00
..
_debugger.js streams2: Call read(0) on resume() 2012-12-14 10:52:28 -08:00
_linklist.js Update copyright headers 2011-03-14 17:37:05 -07:00
_stream_duplex.js streams2: Fix duplex no-half-open logic 2012-12-13 17:00:29 -08:00
_stream_passthrough.js streams2: ctor guards on Stream classes 2012-12-13 17:00:26 -08:00
_stream_readable.js stream: Properly handle large reads from push-streams 2013-01-16 10:45:11 -08:00
_stream_transform.js stream: Use push() for Transform._output() 2013-01-10 13:49:54 -08:00
_stream_writable.js streams2: Do not allow hwm < lwm 2013-01-14 16:03:38 -08:00
assert.js assert: improve support for new execution contexts 2012-12-29 11:19:14 -08:00
buffer.js buffer: improve read/write speed with assert 2013-01-16 10:17:20 -08:00
child_process.js child_process: Pull through untouched stdio streams 2013-01-07 08:36:49 -08:00
cluster.js cluster: make 'listening' handler see actual port 2012-10-09 16:23:24 +02:00
console.js console: refactor the console module to be reusable 2012-08-24 14:31:32 -07:00
constants.js Update copyright headers 2011-03-14 17:37:05 -07:00
crypto.js crypto: Streaming interface for Sign and Verify 2012-12-14 10:52:27 -08:00
dgram.js Merge remote-tracking branch 'ry/v0.8' into master 2013-01-11 10:18:07 -08:00
dns.js Revert "DNS: Support NAPTR queries" 2012-06-16 11:02:49 -07:00
domain.js domain: use camelCase instead of snake_case 2012-12-29 10:37:31 -08:00
events.js domain: use camelCase instead of snake_case 2012-12-29 10:37:31 -08:00
freelist.js Update copyright headers 2011-03-14 17:37:05 -07:00
fs.js fs: remove unused default option in WriteStream 2013-01-04 19:02:05 +01:00
http.js http: fix duplicate var initialization 2013-01-16 17:10:14 +01:00
https.js https: optimize https.createConnection() 2012-12-28 16:42:51 +01:00
module.js lint 2012-10-12 11:46:36 -07:00
net.js net: Use readable.push() instead of private methods 2013-01-10 13:50:05 -08:00
os.js os: add os.endianness() function 2012-11-08 12:31:45 -08:00
path.js path: make basename and extname ignore trailing slashes 2013-01-11 18:50:09 +01:00
punycode.js punycode: update to v1.2.0 2013-01-16 16:53:11 +01:00
querystring.js trivial: Doc typo and lint fix 2012-06-19 14:07:48 -07:00
readline.js readline: use a "string_decoder" to parse "keypress" events 2012-11-06 16:28:30 -08:00
repl.js repl: fix lint 2013-01-12 12:14:39 -08:00
stream.js streams2: The new stream base classes 2012-12-13 17:00:23 -08:00
string_decoder.js Don't allow invalid encodings in StringDecoder class 2012-12-13 17:00:22 -08:00
sys.js Fix #3577 Un-break require('sys') 2012-06-28 10:14:03 -07:00
timers.js timers: Move list.ontimeout to separate function 2012-12-29 15:32:25 -08:00
tls.js tls: follow RFC6125 more stricly 2013-01-14 17:18:30 -08:00
tty.js stdio: Do not read from stdout/err 2012-12-21 11:05:46 -08:00
url.js url: make url.format escape delimiters in path and query 2012-10-30 09:16:13 -07:00
util.js util: fix deprecation message in util.pump 2012-12-26 14:54:56 -08:00
vm.js lint 2012-03-03 23:48:57 -08:00
zlib.js zlib: streams2 2012-12-14 10:52:26 -08:00