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.
Added drain event and returning the boolean from write to proper hand…
…le back pressure when piping.