Fix #6378: linkcheck: Send commonly used User-Agent

This commit is contained in:
Takeshi KOMIYA
2019-05-19 01:39:05 +09:00
parent 4fc121fb99
commit 690a566791
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: