Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ae9e5f03
Commit
ae9e5f03
authored
Sep 09, 2016
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #22450: Use "Accept: */*" in the default headers for urllib.request
parent
c87ae806
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
Lib/urllib/request.py
Lib/urllib/request.py
+1
-1
Misc/NEWS
Misc/NEWS
+4
-0
No files found.
Lib/urllib/request.py
View file @
ae9e5f03
...
...
@@ -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
...
...
Misc/NEWS
View file @
ae9e5f03
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment