aboutsummaryrefslogtreecommitdiff
path: root/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'Plugin')
-rw-r--r--Plugin/URL_Title.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/Plugin/URL_Title.pm b/Plugin/URL_Title.pm
index e93de26..205a6c5 100644
--- a/Plugin/URL_Title.pm
+++ b/Plugin/URL_Title.pm
@@ -55,6 +55,11 @@ sub on_message
return;
}
+ if (not $response->{headers}->{"content-type"}) {
+ $logger->("No content-type in reponse header, not continuing");
+ return;
+ }
+
if (!($response->{headers}->{"content-type"} =~ m,(text/html|image/svg\+xml),)) {
$logger->("I don't think I can parse titles from $response->{headers}->{'content-type'} - stopping here");
return;