From e0f4097eb07b6a206b55357ac6959a0e312c373b Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Wed, 29 Sep 2010 19:26:03 +0200 Subject: [PATCH] Ensure HttpUrl.set_title_from_content() is only called when the content is allowed to be retrieved. --- linkcheck/checker/httpurl.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linkcheck/checker/httpurl.py b/linkcheck/checker/httpurl.py index e85a4d74..715f952d 100644 --- a/linkcheck/checker/httpurl.py +++ b/linkcheck/checker/httpurl.py @@ -643,6 +643,10 @@ Use URL `%(newurl)s' instead for checking.""") % { return False return True + def set_title_from_content (self): + if self.method_get_allowed: + super(HttpUrl, self).set_title_from_content() + def is_html (self): """ See if this URL points to a HTML file by looking at the