2 Commits (867aa88a335a266b904e0271afa36f69af31a869)

Author SHA1 Message Date
Brian White ee032e2385 test: turn off debug output 10 years ago
Brian White 8376f212e6 Parser: ensure no socket read if push() calls _read() during body finish
This fixes an edge case where the following happens:

 * a body stream had data pushed to it such that the highWaterMark was reached
 * when the body stream buffer dips below highWaterMark, _read() is called
 * _read() tries to read more data from the socket, which pushes the last part of the body
 * the last body part push() again calls _read() which in turn reads more data from the socket
 * at this point the parser state is not stable because _body._read and _body are not reset yet, this causes the parser to potentially try to start reading the beginning of a response in the middle of the data for another fetch result for example

Fixes #345
10 years ago