diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2011-05-11 13:17:57 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2011-05-11 13:17:57 (GMT) |
commit | 4de00a2e87ba7c69965ab4edcfcafc9eb63f0a97 (patch) | |
tree | 89f74bcd2b105eeaa6eedd4b8b36ddf379403a2b /Doc/library/urllib.request.rst | |
parent | cc99528d872e0f8a87a762a990beb9e3755cbb42 (diff) | |
download | cpython-4de00a2e87ba7c69965ab4edcfcafc9eb63f0a97.zip cpython-4de00a2e87ba7c69965ab4edcfcafc9eb63f0a97.tar.gz cpython-4de00a2e87ba7c69965ab4edcfcafc9eb63f0a97.tar.bz2 |
Fix closes Issue #11799: urllib.request Authentication Handlers will raise a
ValueError when presented with an unsupported Authentication Scheme.
Diffstat (limited to 'Doc/library/urllib.request.rst')
-rw-r--r-- | Doc/library/urllib.request.rst | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst index 3e24956..f99701d 100644 --- a/Doc/library/urllib.request.rst +++ b/Doc/library/urllib.request.rst @@ -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) |