aboutsummaryrefslogtreecommitdiff
path: root/sbosrcarch
diff options
context:
space:
mode:
Diffstat (limited to 'sbosrcarch')
-rwxr-xr-xsbosrcarch5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbosrcarch b/sbosrcarch
index 777f2c3..c246673 100755
--- a/sbosrcarch
+++ b/sbosrcarch
@@ -612,6 +612,7 @@ sub curl_download_http {
while(<$fh>) {
print "! $_";
}
+ close $fh;
return undef; # connection refused, DNS lookup failed, etc
}
@@ -650,6 +651,7 @@ sub curl_download_http {
while(<$fh>) {
print " ! $_";
}
+ close $fh;
}
open $fh, "<$outfile.hdr";
@@ -658,11 +660,12 @@ sub curl_download_http {
next unless /^HTTP\/\S+\s+(\d+)/;
$httpstatusline = $_, $httpstatus = $1;
}
+ close $fh;
unlink($outfile);
unlink("$outfile.hdr");
- if($httpstatus ne "200") {
+ if(defined $httpstatus && ($httpstatus ne "200")) {
print "! $httpstatusline\n";
unlink $filename;
return undef;