cleaned up code

This commit is contained in:
Harald Hope 2023-11-02 21:41:58 -07:00
parent 8c3b64c74d
commit 4d6c596ed6

3
inxi
View file

@ -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'};