Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Merge pull request #10 from daviddenton/master

fix for issue #7 to consume the stream in a redirect scenario.
  • Loading branch information...
commit 57906bfb6519edf127afe2427ef3657c87e4be2b 2 parents 84f0bb1 + 99acea6
@olalonde authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 index.js
4 index.js
@@ -78,6 +78,10 @@ for (var protocol in protocols) {
return redirect.userCallback(res);
+ // we are going to follow the redirect, but in node 0.10 we must first attach a data listener
+ // to consume the stream and send the 'end' event
+ res.on('data', function() {});
// save the original clientRequest to our redirectOptions so we can emit errors later
// need to use url.resolve() in case location is a relative URL
Please sign in to comment.
Something went wrong with that request. Please try again.