mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-24 09:50:23 +00:00
fall back to GET on bad status line
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1317 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
3ab3dcb186
commit
abccff16ea
1 changed files with 10 additions and 1 deletions
|
|
@ -124,7 +124,16 @@ class HttpUrlData (ProxyUrlData):
|
|||
fallback = False
|
||||
redirectCache = [self.url]
|
||||
while True:
|
||||
response = self._getHttpResponse()
|
||||
try:
|
||||
response = self._getHttpResponse()
|
||||
except httplib2.BadStatusLine:
|
||||
# some servers send empty HEAD replies
|
||||
if self.method=="HEAD":
|
||||
self.method = "GET"
|
||||
redirectCache = [self.url]
|
||||
fallback = True
|
||||
continue
|
||||
raise
|
||||
self.headers = response.msg
|
||||
debug(BRING_IT_ON, response.status, response.reason, self.headers)
|
||||
# proxy enforcement (overrides standard proxy)
|
||||
|
|
|
|||
Loading…
Reference in a new issue