mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
linkcheck: Fall back to a GET request on 403 status
stable branch version of 2f46c7899c
Add changelog entry
This commit is contained in:
parent
14a1d5df29
commit
0d58607d8a
1
CHANGES
1
CHANGES
@ -6,6 +6,7 @@ Bugs fixed
|
||||
|
||||
* #2870: flatten genindex columns' heights.
|
||||
* #2856: Search on generated HTML site doesnt find some symbols
|
||||
* #2882: Fall back to a GET request on 403 status in linkcheck
|
||||
|
||||
Release 1.4.6 (released Aug 20, 2016)
|
||||
=====================================
|
||||
|
@ -183,10 +183,10 @@ class CheckExternalLinksBuilder(Builder):
|
||||
f = opener.open(req, **kwargs)
|
||||
f.close()
|
||||
except HTTPError as err:
|
||||
if err.code != 405:
|
||||
if err.code not in (403, 405):
|
||||
raise
|
||||
# retry with GET if that fails, some servers
|
||||
# don't like HEAD requests and reply with 405
|
||||
# don't like HEAD requests and reply with 403 or 405
|
||||
req = Request(req_url)
|
||||
f = opener.open(req, **kwargs)
|
||||
f.close()
|
||||
|
Loading…
Reference in New Issue
Block a user