mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #22450: Use "Accept: */*" in the default headers for urllib.request
This commit is contained in:
parent
c87ae806ab
commit
ae9e5f032d
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -70,6 +70,10 @@ Library
|
|||
- Issue #27445: Don't pass str(_charset) to MIMEText.set_payload().
|
||||
Patch by Claude Paroz.
|
||||
|
||||
- Issue #22450: urllib now includes an "Accept: */*" header among the
|
||||
default headers. This makes the results of REST API requests more
|
||||
consistent and predictable especially when proxy servers are involved.
|
||||
|
||||
- lib2to3.pgen3.driver.load_grammar() now creates a stable cache file
|
||||
between runs given the same Grammar.txt input regardless of the hash
|
||||
randomization setting.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue