Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:jberger/Alien-Base
Browse files Browse the repository at this point in the history
  • Loading branch information
jberger committed Apr 11, 2012
2 parents 0397c43 + 07914e2 commit 201486a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/Alien/Base/ModuleBuild/Repository/HTTP.pm
Expand Up @@ -42,7 +42,7 @@ sub get_file {
my $host = $self->{host};
my $from = $self->location;

my $response = $self->connection->mirror( $host . $from . $file, $file );
my $response = $self->connection->mirror('http://' . $host . $from . '/' . $file, $file );
croak "Download failed: " . $response->{reason} unless $response->{success};

return 1;
Expand All @@ -52,18 +52,17 @@ sub list_files {
my $self = shift;

my $host = $self->host;
my $uri = URI->new($host);
my $location = $self->location;
my $uri = URI->new('http://' . $host . $location);

my $res = $self->connection->get($uri->abs($self->location));
my $res = $self->connection->get($uri);

unless ($res->{success}) {
carp $res->{reason};
return ();
}

my @links =
map { $uri->abs($_) }
$self->find_links($res->{content});
my @links = $self->find_links($res->{content});

return @links;
}
Expand Down

0 comments on commit 201486a

Please sign in to comment.