Pipe back pressure issue #273

merged 1 commit into from Jun 25, 2012


None yet

2 participants


Currently request doesn't return a boolean from write to indicate whether or not the write was flushed nor does it emit a drain event.

This can result in a large memory overhead when piping large files to request because of back pressure.


If the above readstream reads faster than request can write we'll end up having most of the file in memory.
This patch fixes this issue by adding the drain event and returning the boolean from req.write.

@mikeal mikeal merged commit 9746bb4 into request:master Jun 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment