aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@yeah.nah.nz>2019-01-05 16:31:01 +1300
committerDavid Phillips <david@yeah.nah.nz>2019-01-05 16:31:01 +1300
commit42489797458338ec2a7c273c3068f7c9d9ee9ece (patch)
treeee609ef0883cb7ab5fa3f6754b730f80777ffa93
parent50d5e664e8fa21252b760bd54dd4a025d3f06585 (diff)
downloadidalius-42489797458338ec2a7c273c3068f7c9d9ee9ece.tar.xz
URL_Title: Fix return code text
-rw-r--r--Plugin/URL_Title.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/Plugin/URL_Title.pm b/Plugin/URL_Title.pm
index 19b7437..cb7474c 100644
--- a/Plugin/URL_Title.pm
+++ b/Plugin/URL_Title.pm
@@ -53,8 +53,12 @@ sub get_title
my $response = $http->get($url);
if (!$response->{success}) {
- chomp $response->{content};
- return (undef, "Error: HTTP client: $response->{reason} ($response->{content})");
+ if ($response->{status} == 599) {
+ chomp $response->{content};
+ return (undef, "Error: HTTP client: $response->{content}");
+ } else {
+ return (undef, "Error: HTTP $response->{status} ($response->{reason})");
+ }
}
if (not $response->{headers}->{"content-type"}) {