Merge pull request #6381 from tk0miya/6378_linkcheck

Fix #6378: linkcheck: Send commonly used User-Agent
This commit is contained in:
Takeshi KOMIYA 2019-05-19 23:25:56 +09:00 committed by GitHub
commit d854ec9e10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -116,6 +116,7 @@ Bugs fixed
* #6165: autodoc: ``tab_width`` setting of docutils has been ignored
* #6311: autosummary: autosummary table gets confused by complex type hints
* Generated Makefiles lack a final EOL (refs: #6232)
* #6378: linkcheck: Send commonly used User-Agent
Testing
--------

View File

@ -108,7 +108,8 @@ class CheckExternalLinksBuilder(Builder):
kwargs = {
'allow_redirects': True,
'headers': {
'Accept': 'text/html,application/xhtml+xml;q=0.9,*/*;q=0.8'
'Accept': 'text/html,application/xhtml+xml;q=0.9,*/*;q=0.8',
'User-Agent': requests.useragent_header[0][1],
},
}
if self.app.config.linkcheck_timeout: