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
4bb5c273
Commit
4bb5c273
authored
Aug 26, 2010
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Issue8797 - Reset the basic auth retry count when response code is not 401.
parent
0e10206f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
Lib/urllib/request.py
Lib/urllib/request.py
+4
-1
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/urllib/request.py
View file @
4bb5c273
...
...
@@ -799,7 +799,10 @@ class AbstractBasicAuthHandler:
if
mo
:
scheme
,
quote
,
realm
=
mo
.
groups
()
if
scheme
.
lower
()
==
'basic'
:
return
self
.
retry_http_basic_auth
(
host
,
req
,
realm
)
response
=
self
.
retry_http_basic_auth
(
host
,
req
,
realm
)
if
response
and
response
.
code
!=
401
:
self
.
retried
=
0
return
response
def
retry_http_basic_auth
(
self
,
host
,
req
,
realm
):
user
,
pw
=
self
.
passwd
.
find_user_password
(
realm
,
host
)
...
...
Misc/NEWS
View file @
4bb5c273
...
...
@@ -132,6 +132,9 @@ Extensions
Library
-------
- Issue #8797: urllib2 does a retry for Basic Authentication failure instead of
falling into recursion.
- Issue #1194222: email.utils.parsedate now returns RFC2822 compliant four
character years even if the message contains RFC822 two character years.
...
...
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