}
# 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');
# 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\)");
}
# 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.