Issue #22450: Use "Accept: */*" in the default headers for urllib.request

This commit is contained in:
Raymond Hettinger 2016-09-09 16:43:48 -07:00
parent c87ae806ab
commit ae9e5f032d
2 changed files with 5 additions and 1 deletions

View file

@ -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