diff options
Diffstat (limited to 'sbosrcarch')
-rwxr-xr-x | sbosrcarch | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; |