From: Stefan Schantl Date: Thu, 24 Mar 2022 19:29:21 +0000 (+0100) Subject: ids-functions.pl: Re-order download request handler creation. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f264adda359ec58846840e60d9743ca522fa4004;p=people%2Fstevee%2Fipfire-2.x.git ids-functions.pl: Re-order download request handler creation. Signed-off-by: Stefan Schantl --- diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index 35b8f7a833..c0e64a3a22 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -382,13 +382,13 @@ sub downloadruleset ($) { return 1; } + # Pass the requested URL to the downloader. + my $request = HTTP::Request->new(GET => $url); + # Generate temporary file name, located in "/var/tmp" and with a suffix of ".tmp". my $tmp = File::Temp->new( SUFFIX => ".tmp", DIR => "/var/tmp/", UNLINK => 0 ); my $tmpfile = $tmp->filename(); - # Pass the requested url to the downloader. - my $request = HTTP::Request->new(GET => $url); - my $dl_attempt = 1; my $response;