This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: AbstractBasicAuthHandler
Type: behavior Stage:
Components: Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Perry.Lorier, iritkatriel, orsenthil
Priority: normal Keywords:

Created on 2013-10-26 01:50 by Perry.Lorier, last changed 2022-04-11 14:57 by admin.

Messages (2)
msg201309 - (view) Author: Perry Lorier (Perry.Lorier) Date: 2013-10-26 01:50
Similar to Issue8797, if the first 5 requests result in exception (eg 404), then AbstractBasicAuthHandler.retried is not reset, meaning authentication will fail on all subsequent attempts.

The logic in AbstractBasicAuthHandler.http_error_401 calling self.reset_retry_count() needs to be fixed, possibly moving it up before the call to http_error_auth_reqed()
msg396061 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-06-18 13:16
I think Perry means HTTPBasicAuthHandler.http_error_401, which seems to still be missing a reset_retry_count() call.

https://github.com/python/cpython/blob/0982ded179f280176868c1c4eccf77bf70687816/Lib/urllib/request.py#L1050
History
Date User Action Args
2022-04-11 14:57:52adminsetgithub: 63601
2021-06-18 13:16:19iritkatrielsetnosy: + iritkatriel

messages: + msg396061
versions: + Python 3.9, Python 3.10, Python 3.11, - Python 2.7
2014-10-02 10:24:10BreamoreBoysetnosy: + orsenthil
2013-10-26 01:50:04Perry.Loriercreate