mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
die if PageNotFound page is returned successfully
This commit is contained in:
parent
150e9a44e5
commit
e657de6c50
1 changed files with 5 additions and 0 deletions
|
@ -238,6 +238,11 @@ sub mirror {
|
|||
print "Downloading $version from $url...\n";
|
||||
my $res = HTTP::Tiny->new->mirror($url => $file);
|
||||
die "Can't mirror $file: ".$res->{reason} unless $res->{success};
|
||||
my $content_type = $res->{headers}{'content-type'};
|
||||
if ($content_type !~ /x\-gzip/) {
|
||||
unlink $file;
|
||||
die "Not a gzipped tarball: ".$content_type;
|
||||
}
|
||||
}
|
||||
my $dir = srcdir($version);
|
||||
unless ($dir && -d $dir) {
|
||||
|
|
Loading…
Add table
Reference in a new issue