Skip to content

Commit

Permalink
check is_abs instead of scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 24, 2012
1 parent fa572d6 commit a11f1dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojo/UserAgent/Transactor.pm
Expand Up @@ -139,7 +139,7 @@ sub redirect {
# Fix broken location without authority and/or scheme
return unless my $location = $res->headers->location;
$location = Mojo::URL->new($location);
$location = $location->base($old->req->url)->to_abs unless $location->scheme;
$location = $location->base($old->req->url)->to_abs unless $location->is_abs;

# Clone request if necessary
my $new = Mojo::Transaction::HTTP->new;
Expand Down

0 comments on commit a11f1dc

Please sign in to comment.