mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-04 12:54:42 +00:00
Add workaround for buggy IIS HEAD support.
This commit is contained in:
parent
6130233d74
commit
de5d1757f0
2 changed files with 10 additions and 3 deletions
|
|
@ -1,5 +1,10 @@
|
|||
6.5 "" (released xx.xx.2011)
|
||||
|
||||
Changes:
|
||||
- checking: Use HTTP GET requests to work around buggy IIS servers
|
||||
sending false positive status codes for HEAD requests.
|
||||
|
||||
|
||||
6.4 "The Sunset Limited" (released 20.2.2011)
|
||||
|
||||
Fixes:
|
||||
|
|
|
|||
|
|
@ -272,9 +272,11 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
|
|||
mime = self.get_content_type()
|
||||
poweredby = self.headers.get('X-Powered-By', '')
|
||||
server = self.headers.get('Server', '')
|
||||
if mime in ('application/octet-stream', 'text/plain') and \
|
||||
(poweredby.startswith('Zope') or server.startswith('Zope')):
|
||||
# Zope server could not get Content-Type with HEAD
|
||||
if ((mime in ('application/octet-stream', 'text/plain') and
|
||||
(poweredby.startswith('Zope') or server.startswith('Zope')))
|
||||
or ('ASP.NET' in poweredby and 'Microsoft-IIS' in server)):
|
||||
# Zope or IIS server could not get Content-Type with HEAD
|
||||
# see http://intermapper.com.dev4.silvertech.net/bogus.aspx
|
||||
self.method = "GET"
|
||||
self.aliases = []
|
||||
self.fallback_get = True
|
||||
|
|
|
|||
Loading…
Reference in a new issue