From 1c59cb4d4c99ecc151009edd406f9f6a232bdecc Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Sat, 22 Sep 2012 07:53:11 +0200 Subject: [PATCH] Use GET in case a HEAD method does not succeed, even if robots.txt content checkes denied the page. This way proper check results are achieved (but the content is still not checked, so it's ok). --- linkcheck/checker/httpurl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linkcheck/checker/httpurl.py b/linkcheck/checker/httpurl.py index d63fa2b7..2c1fb57d 100644 --- a/linkcheck/checker/httpurl.py +++ b/linkcheck/checker/httpurl.py @@ -259,7 +259,7 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport): @return: True if checker should use GET, else False @rtype: bool """ - if self.method == "HEAD" and self.method_get_allowed: + if self.method == "HEAD": # Some sites do not support HEAD requests, for example # youtube sends a 404 with HEAD, 200 with GET. Doh. # A 405 "Method not allowed" status should also use GET.