Skip to content

Commit

Permalink
fix redirects when schema is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Aug 21, 2012
1 parent 4c97304 commit 63cc131
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ Request.prototype.buffer = function(val){
*/

Request.prototype.redirect = function(res){
var url = this.protocol + res.headers.location;
var url = res.headers.location;
if (!~url.indexOf('://')) url = this.protocol + url;
delete this.req;
this.method = 'HEAD' == this.method
? this.method
Expand Down

0 comments on commit 63cc131

Please sign in to comment.