From 4d6c596ed6083bd60e6df297a6a73364440ea428 Mon Sep 17 00:00:00 2001 From: Harald Hope Date: Thu, 2 Nov 2023 21:41:58 -0700 Subject: [PATCH] cleaned up code --- inxi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/inxi b/inxi index fe336d9..cb30e44 100755 --- a/inxi +++ b/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'};