diff options
author | David Phillips <david@yeah.nah.nz> | 2018-10-02 17:02:32 +1300 |
---|---|---|
committer | David Phillips <david@yeah.nah.nz> | 2018-10-02 17:02:32 +1300 |
commit | 765205d27f19ff2b4484336b570937feaedd8643 (patch) | |
tree | f9d46385ec36a01a3014e1f9b72601a54adbf1da /Plugin | |
parent | 368c962f722853ee0ba371d37e5ba0396e83b900 (diff) | |
download | idalius-765205d27f19ff2b4484336b570937feaedd8643.tar.xz |
URL_Title: Don't try and use non-existent header
Diffstat (limited to 'Plugin')
-rw-r--r-- | Plugin/URL_Title.pm | 5 |
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; |