summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--lib/SlackBuild/Archive/Extractor/HTTP.pm5
-rw-r--r--lib/SlackBuild/Request.pm1
-rw-r--r--lib/SlackBuild/URI.pm2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/SlackBuild/Archive/Extractor/HTTP.pm b/lib/SlackBuild/Archive/Extractor/HTTP.pm
index 4676d95..ad6e1d2 100644
--- a/lib/SlackBuild/Archive/Extractor/HTTP.pm
+++ b/lib/SlackBuild/Archive/Extractor/HTTP.pm
@@ -42,11 +42,12 @@ sub extract {
my $uri = $self->archive->new_abs($file);
my ($dh,$tmp) = File::Temp::tempfile(DIR => $dir, UNLINK => 1);
chmod 0644, $dh;
- unless ($uri->download($tmp)) {
+ my $subres = $uri->download($tmp);
+ unless ($subres) {
return $result;
}
my $destfile = File::Spec->catfile($dst, $file);
- if ($result->is_html && $self->_html_list($tmp, $file)) {
+ if ($subres->is_html && $self->_html_list($tmp, $file)) {
;
} else {
rename $tmp, $destfile
diff --git a/lib/SlackBuild/Request.pm b/lib/SlackBuild/Request.pm
index 3876b56..c45f834 100644
--- a/lib/SlackBuild/Request.pm
+++ b/lib/SlackBuild/Request.pm
@@ -107,7 +107,6 @@ my %attributes = (
},
build => {
type => 'SCALAR',
- default => 1,
},
slackbuild_uri => {
type => 'SCALAR',
diff --git a/lib/SlackBuild/URI.pm b/lib/SlackBuild/URI.pm
index b0d6724..93fa9ef 100644
--- a/lib/SlackBuild/URI.pm
+++ b/lib/SlackBuild/URI.pm
@@ -77,7 +77,7 @@ sub download {
my $result = new SlackBuild::Download($self,
success => $response->is_success);
if ($response->is_success) {
- $result->content_type(scalar($response->content_type));
+ $result->content_type(($response->content_type)[0]);
} else {
$self->logger->error("$self: " . $response->status_line);
}

Return to:

Send suggestions and report system problems to the System administrator.