Skip to content
Snippets Groups Projects
Commit a02582da authored by Síle Ekaterin Liszka's avatar Síle Ekaterin Liszka
Browse files

Chessa::URI::Default: finish cleaning up

parent 0697b612
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ sub handle($self, $on_info, $uri, $errors) {
method => 'HEAD',
on_response => sub ($response) {
$self->{log}("Headers fetched for $uri: " . $response->status_line);
$self->head($http, $response, $uri, $on_info, $errors);
$self->head($response, $uri, $on_info, $errors);
}, on_error => sub ($msg) {
$self->{log}("Failed to fetch headers for $uri: $msg");
$on_info->($self->{msg}('Error', "Unable to fetch headers: $msg")) if $errors;
......@@ -52,7 +52,7 @@ sub handle($self, $on_info, $uri, $errors) {
);
}
sub head($self, $http, $response, $uri, $on_info, $errors) {
sub head($self, $response, $uri, $on_info, $errors) {
my $authority = $uri->authority;
$authority =~ s/^www\.(.*?)(?:\:.*)/$1/;
......@@ -68,7 +68,7 @@ sub head($self, $http, $response, $uri, $on_info, $errors) {
return unless (defined($type) && ($type !~ /^\s*$/));
if ($type =~ m!^(text/html|application/xhtml\+xml)!) {
$http->do_request(
$self->{http}->do_request(
uri => $uri,
method => 'GET',
on_response => sub ($response) {
......@@ -80,7 +80,7 @@ sub head($self, $http, $response, $uri, $on_info, $errors) {
},
);
} elsif ($type =~ m!^application/atom\+xml(?:$|;)!) {
$http->do_request(
$self->{http}->do_request(
uri => $uri,
method => 'GET',
on_response => sub ($response) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment