Revert "ids-functions.pl: Use GET method to fetch Header data of a file"
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 6 Feb 2019 09:00:17 +0000 (10:00 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Wed, 6 Feb 2019 09:00:17 +0000 (10:00 +0100)
Using the GET method will download the file twice and does not provide the
desired mechanism here.

This reverts commit 81592314ebe93ae942f28a1bc9037185f155ccda.

config/cfgroot/ids-functions.pl

index afccf43..98bf580 100644 (file)
@@ -211,7 +211,7 @@ sub downloadruleset {
        }
 
        # Pass the requrested url to the downloader.
-       my $request = HTTP::Request->new(GET => $url);
+       my $request = HTTP::Request->new(HEAD => $url);
 
        # Accept the html header.
        $request->header('Accept' => 'text/html');