mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-03 12:24:46 +00:00
Remove Amazon quirk because the default behaviour handles this now.
This commit is contained in:
parent
02a9f0bacb
commit
e252bbf623
2 changed files with 0 additions and 12 deletions
|
|
@ -49,9 +49,6 @@ supportHttps = hasattr(httplib, "HTTPSConnection")
|
|||
|
||||
_supported_encodings = ('gzip', 'x-gzip', 'deflate')
|
||||
|
||||
# Amazon blocks all HEAD requests
|
||||
_is_amazon = re.compile(r'^www\.amazon\.(com|de|ca|fr|co\.(uk|jp))').search
|
||||
|
||||
|
||||
class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
|
||||
"""
|
||||
|
|
@ -142,13 +139,6 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
|
|||
self.method_get_allowed = False
|
||||
# first try with HEAD
|
||||
self.method = "HEAD"
|
||||
# check for amazon server quirk
|
||||
if _is_amazon(self.urlparts[1]):
|
||||
if self.method_get_allowed:
|
||||
self.method = "GET"
|
||||
else:
|
||||
# XXX make this a warning instead
|
||||
self.add_info(_("Amazon servers block HTTP HEAD requests."))
|
||||
# check the http connection
|
||||
response = self.check_http_connection()
|
||||
# redirections might have changed the URL
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ class TestHttps (LinkCheckTest):
|
|||
u"url %s" % url,
|
||||
u"cache key %s" % url,
|
||||
u"real url %s" % url,
|
||||
u"info Amazon servers block HTTP HEAD requests.",
|
||||
u"info Using GET method for Amazon server.",
|
||||
u"valid",
|
||||
]
|
||||
self.direct(url, resultlines)
|
||||
|
|
|
|||
Loading…
Reference in a new issue