mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 08:11:39 +00:00
cleaned up code
This commit is contained in:
parent
8c3b64c74d
commit
4d6c596ed6
3
inxi
3
inxi
|
@ -2711,8 +2711,7 @@ sub download_file {
|
|||
sub get_file_http_tiny {
|
||||
my ($type,$url,$file,$ua) = @_;
|
||||
$ua = ($ua && $dl{'ua'}) ? $dl{'ua'} . $ua: '';
|
||||
my %headers;
|
||||
%headers = ('agent' => $ua) if $ua;
|
||||
my %headers = ($ua) ? ('agent' => $ua) : ();
|
||||
my $tiny = HTTP::Tiny->new(%headers);
|
||||
# note: default is no verify, so default here actually is to verify unless overridden
|
||||
$tiny->verify_SSL => 1 if !$use{'no-ssl'};
|
||||
|
|
Loading…
Reference in a new issue