]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
ids-functions.pl: Re-order download request handler creation.
authorStefan Schantl <stefan.schantl@ipfire.org>
Thu, 24 Mar 2022 19:29:21 +0000 (20:29 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Thu, 24 Mar 2022 19:29:21 +0000 (20:29 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/cfgroot/ids-functions.pl

index 35b8f7a83369fc0878537f2d9b214b11ada71713..c0e64a3a225a0f7057ffcaf09c0aa7d841bdb85e 100644 (file)
@@ -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;