diff options
author | Raymond Hettinger <python@rcn.com> | 2016-09-09 23:43:48 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2016-09-09 23:43:48 (GMT) |
commit | ae9e5f032d05377ec0aef04947b449a9a0d7a3b3 (patch) | |
tree | f90fcb9bac9d34e068da12bb1ca36ebe53c0ef12 /Lib/urllib | |
parent | c87ae806abdf79dd5d000aaec47596122a93b29b (diff) | |
download | cpython-ae9e5f032d05377ec0aef04947b449a9a0d7a3b3.zip cpython-ae9e5f032d05377ec0aef04947b449a9a0d7a3b3.tar.gz cpython-ae9e5f032d05377ec0aef04947b449a9a0d7a3b3.tar.bz2 |
Issue #22450: Use "Accept: */*" in the default headers for urllib.request
Diffstat (limited to 'Lib/urllib')
-rw-r--r-- | Lib/urllib/request.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 3be327d..a4bf97d 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -1625,7 +1625,7 @@ class URLopener: self.proxies = proxies self.key_file = x509.get('key_file') self.cert_file = x509.get('cert_file') - self.addheaders = [('User-Agent', self.version)] + self.addheaders = [('User-Agent', self.version), ('Accept', '*/*')] self.__tempfiles = [] self.__unlink = os.unlink # See cleanup() self.tempcache = None |