mirror of
https://github.com/python/cpython.git
synced 2025-08-15 06:10:47 +00:00
[3.12] gh-101100: Fix Sphinx warnings in howto/urllib2.rst
and library/http.client.rst
(GH-114060) (#114063)
(cherry picked from commit c2808431b3
)
This commit is contained in:
parent
2aea0e967a
commit
cc11c76da7
8 changed files with 48 additions and 48 deletions
|
@ -392,16 +392,16 @@ info and geturl
|
|||
===============
|
||||
|
||||
The response returned by urlopen (or the :exc:`~urllib.error.HTTPError` instance) has two
|
||||
useful methods :meth:`info` and :meth:`geturl` and is defined in the module
|
||||
:mod:`urllib.response`..
|
||||
useful methods :meth:`!info` and :meth:`!geturl` and is defined in the module
|
||||
:mod:`urllib.response`.
|
||||
|
||||
**geturl** - this returns the real URL of the page fetched. This is useful
|
||||
because ``urlopen`` (or the opener object used) may have followed a
|
||||
redirect. The URL of the page fetched may not be the same as the URL requested.
|
||||
* **geturl** - this returns the real URL of the page fetched. This is useful
|
||||
because ``urlopen`` (or the opener object used) may have followed a
|
||||
redirect. The URL of the page fetched may not be the same as the URL requested.
|
||||
|
||||
**info** - this returns a dictionary-like object that describes the page
|
||||
fetched, particularly the headers sent by the server. It is currently an
|
||||
:class:`http.client.HTTPMessage` instance.
|
||||
* **info** - this returns a dictionary-like object that describes the page
|
||||
fetched, particularly the headers sent by the server. It is currently an
|
||||
:class:`http.client.HTTPMessage` instance.
|
||||
|
||||
Typical headers include 'Content-length', 'Content-type', and so on. See the
|
||||
`Quick Reference to HTTP Headers <https://jkorpela.fi/http.html>`_
|
||||
|
@ -507,7 +507,7 @@ than the URL you pass to .add_password() will also match. ::
|
|||
|
||||
In the above example we only supplied our ``HTTPBasicAuthHandler`` to
|
||||
``build_opener``. By default openers have the handlers for normal situations
|
||||
-- ``ProxyHandler`` (if a proxy setting such as an :envvar:`http_proxy`
|
||||
-- ``ProxyHandler`` (if a proxy setting such as an :envvar:`!http_proxy`
|
||||
environment variable is set), ``UnknownHandler``, ``HTTPHandler``,
|
||||
``HTTPDefaultErrorHandler``, ``HTTPRedirectHandler``, ``FTPHandler``,
|
||||
``FileHandler``, ``DataHandler``, ``HTTPErrorProcessor``.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue