Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #8 from jtpalmer/master

Fix http protocol. I (joel) haven't had much time for it yet. jtpalmer++
  • Loading branch information...
commit 07914e28fc2f976c987562ad5af81076bbe30f0d 2 parents 0f65794 + 57f9c02
@jberger jberger authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 lib/Alien/Base/ModuleBuild/Repository/HTTP.pm
View
11 lib/Alien/Base/ModuleBuild/Repository/HTTP.pm
@@ -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;
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.