]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
ids-functions.pl: Fix show HTTP error code and message
authorStefan Schantl <stefan.schantl@ipfire.org>
Tue, 5 Feb 2019 10:55:37 +0000 (11:55 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Tue, 5 Feb 2019 10:55:37 +0000 (11:55 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/cfgroot/ids-functions.pl

index 4452b4be3de32ea6de4cfd8254811ae4f8dd43b3..98bf5806bd984758ea77acccbb8f09d0421b2015 100644 (file)
@@ -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.