diff --git a/CHANGES b/CHANGES index cedbb7b61..44649c0a4 100644 --- a/CHANGES +++ b/CHANGES @@ -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 -------- diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py index 84a69436a..164f1e6b7 100644 --- a/sphinx/builders/linkcheck.py +++ b/sphinx/builders/linkcheck.py @@ -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: