Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix http protocol

  • Loading branch information...
commit 57f9c029aced89ded09bb3447f2db512de6b9a17 1 parent 0f65794
@jtpalmer jtpalmer 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.