mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Fix closes Issue #11799: urllib.request Authentication Handlers will raise a
ValueError when presented with an unsupported Authentication Scheme.
This commit is contained in:
parent
cc99528d87
commit
4de00a2e87
4 changed files with 63 additions and 16 deletions
|
|
@ -240,10 +240,11 @@ The following classes are provided:
|
|||
|
||||
.. class:: HTTPBasicAuthHandler(password_mgr=None)
|
||||
|
||||
Handle authentication with the remote host. *password_mgr*, if given, should be
|
||||
something that is compatible with :class:`HTTPPasswordMgr`; refer to section
|
||||
:ref:`http-password-mgr` for information on the interface that must be
|
||||
supported.
|
||||
Handle authentication with the remote host. *password_mgr*, if given, should
|
||||
be something that is compatible with :class:`HTTPPasswordMgr`; refer to
|
||||
section :ref:`http-password-mgr` for information on the interface that must
|
||||
be supported. HTTPBasicAuthHandler will raise a :exc:`ValueError` when
|
||||
presented with a wrong Authentication scheme.
|
||||
|
||||
|
||||
.. class:: ProxyBasicAuthHandler(password_mgr=None)
|
||||
|
|
@ -265,10 +266,19 @@ The following classes are provided:
|
|||
|
||||
.. class:: HTTPDigestAuthHandler(password_mgr=None)
|
||||
|
||||
Handle authentication with the remote host. *password_mgr*, if given, should be
|
||||
something that is compatible with :class:`HTTPPasswordMgr`; refer to section
|
||||
:ref:`http-password-mgr` for information on the interface that must be
|
||||
supported.
|
||||
Handle authentication with the remote host. *password_mgr*, if given, should
|
||||
be something that is compatible with :class:`HTTPPasswordMgr`; refer to
|
||||
section :ref:`http-password-mgr` for information on the interface that must
|
||||
be supported. When both Digest Authentication Handler and Basic
|
||||
Authentication Handler are both added, Digest Authentication is always tried
|
||||
first. If the Digest Authentication returns a 40x response again, it is sent
|
||||
to Basic Authentication handler to Handle. This Handler method will raise a
|
||||
:exc:`ValueError` when presented with an authentication scheme other than
|
||||
Digest or Basic.
|
||||
|
||||
..versionchanged:: 3.3
|
||||
Raise ValueError on unsupported Authentication Scheme.
|
||||
|
||||
|
||||
|
||||
.. class:: ProxyDigestAuthHandler(password_mgr=None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue