i was getting a weird error using the master branch of request and sending it to a file:
TypeError: Cannot call method 'apply' of undefined
at [object Object].ondrain (stream.js:43:33)
at [object Object].emit (events.js:61:17)
at [object Object].flush (fs.js:1010:32)
at wrapper (fs.js:295:17)
I changed pause and resume to operate on response instead of request. However, I'm not sure if there will be any consequences to the change.
pause and resume should act on response instead of request
my brain hurts, but i think this is correct.
Request is a duplexed read/write stream. pause() and resume() are for readable streams, when the Request stream is being read it's in relation to the HTTP response, not the HTTP request, so I think this is all right.
Did you happen to run test/test-pipes?
yup - says "All tests passed." - but the tests don't actually check for pause/resume. However - I think we're right that pause/resume should only happen on response.
i'm gonna merge this today and write a test for it sometime this week before i release.