]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - config/cfgroot/ids-functions.pl
ids-functions.pl: Use GET method to fetch Header data of a file
[ipfire-2.x.git] / config / cfgroot / ids-functions.pl
index 4452b4be3de32ea6de4cfd8254811ae4f8dd43b3..afccf43263d813289e663bda433675f9f2e2b03d 100644 (file)
@@ -211,7 +211,7 @@ sub downloadruleset {
        }
 
        # Pass the requrested url to the downloader.
-       my $request = HTTP::Request->new(HEAD => $url);
+       my $request = HTTP::Request->new(GET => $url);
 
        # Accept the html header.
        $request->header('Accept' => 'text/html');
@@ -222,7 +222,7 @@ sub downloadruleset {
        # Check if there was any error.
        unless ($response->is_success) {
                # Obtain error.
-               my $error = $response->content;
+               my $error = $response->status_line();
 
                # Log error message.
                &_log_to_syslog("Unable to download the ruleset. \($error\)");
@@ -232,7 +232,7 @@ sub downloadruleset {
        }
 
        # Assign the fetched header object.
-       my $header = $response->headers;
+       my $header = $response->headers();
 
        # Grab the remote file size from the object and store it in the
        # variable.