summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2017-01-24 00:22:45 +0000
committerMartin Panter <vadmium+py@gmail.com>2017-01-24 00:22:45 +0000
commitefba28c5800af5b2cec5719d3406881f0544d217 (patch)
treee1e3ea929d653130b3f2980ddb13df352485ffd0
parentf0739cbfe79ac48a20c612e20d5bf71162da7909 (diff)
downloadcpython-git-efba28c5800af5b2cec5719d3406881f0544d217.tar.gz
Issue #29189: Fix indentation in RST markup
-rw-r--r--Doc/library/urllib.rst76
1 files changed, 38 insertions, 38 deletions
diff --git a/Doc/library/urllib.rst b/Doc/library/urllib.rst
index a2d6852ae6..439482aeb9 100644
--- a/Doc/library/urllib.rst
+++ b/Doc/library/urllib.rst
@@ -295,15 +295,15 @@ Utility functions
If both lowercase and uppercase environment variables exist (and disagree),
lowercase is preferred.
- .. note::
+ .. note::
- If the environment variable ``REQUEST_METHOD`` is set, which usually
- indicates your script is running in a CGI environment, the environment
- variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is
- because that variable can be injected by a client using the "Proxy:"
- HTTP header. If you need to use an HTTP proxy in a CGI environment,
- either use ``ProxyHandler`` explicitly, or make sure the variable name
- is in lowercase (or at least the ``_proxy`` suffix).
+ If the environment variable ``REQUEST_METHOD`` is set, which usually
+ indicates your script is running in a CGI environment, the environment
+ variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is
+ because that variable can be injected by a client using the "Proxy:" HTTP
+ header. If you need to use an HTTP proxy in a CGI environment, either use
+ ``ProxyHandler`` explicitly, or make sure the variable name is in
+ lowercase (or at least the ``_proxy`` suffix).
.. note::
urllib also exposes certain utility functions like splittype, splithost and
@@ -344,47 +344,47 @@ URL Opener objects
:class:`URLopener` objects will raise an :exc:`IOError` exception if the server
returns an error code.
- .. method:: open(fullurl[, data])
+ .. method:: open(fullurl[, data])
- Open *fullurl* using the appropriate protocol. This method sets up cache and
- proxy information, then calls the appropriate open method with its input
- arguments. If the scheme is not recognized, :meth:`open_unknown` is called.
- The *data* argument has the same meaning as the *data* argument of
- :func:`urlopen`.
+ Open *fullurl* using the appropriate protocol. This method sets up cache and
+ proxy information, then calls the appropriate open method with its input
+ arguments. If the scheme is not recognized, :meth:`open_unknown` is called.
+ The *data* argument has the same meaning as the *data* argument of
+ :func:`urlopen`.
- .. method:: open_unknown(fullurl[, data])
+ .. method:: open_unknown(fullurl[, data])
- Overridable interface to open unknown URL types.
+ Overridable interface to open unknown URL types.
- .. method:: retrieve(url[, filename[, reporthook[, data]]])
+ .. method:: retrieve(url[, filename[, reporthook[, data]]])
- Retrieves the contents of *url* and places it in *filename*. The return value
- is a tuple consisting of a local filename and either a
- :class:`mimetools.Message` object containing the response headers (for remote
- URLs) or ``None`` (for local URLs). The caller must then open and read the
- contents of *filename*. If *filename* is not given and the URL refers to a
- local file, the input filename is returned. If the URL is non-local and
- *filename* is not given, the filename is the output of :func:`tempfile.mktemp`
- with a suffix that matches the suffix of the last path component of the input
- URL. If *reporthook* is given, it must be a function accepting three numeric
- parameters. It will be called after each chunk of data is read from the
- network. *reporthook* is ignored for local URLs.
+ Retrieves the contents of *url* and places it in *filename*. The return value
+ is a tuple consisting of a local filename and either a
+ :class:`mimetools.Message` object containing the response headers (for remote
+ URLs) or ``None`` (for local URLs). The caller must then open and read the
+ contents of *filename*. If *filename* is not given and the URL refers to a
+ local file, the input filename is returned. If the URL is non-local and
+ *filename* is not given, the filename is the output of :func:`tempfile.mktemp`
+ with a suffix that matches the suffix of the last path component of the input
+ URL. If *reporthook* is given, it must be a function accepting three numeric
+ parameters. It will be called after each chunk of data is read from the
+ network. *reporthook* is ignored for local URLs.
- If the *url* uses the :file:`http:` scheme identifier, the optional *data*
- argument may be given to specify a ``POST`` request (normally the request type
- is ``GET``). The *data* argument must in standard
- :mimetype:`application/x-www-form-urlencoded` format; see the :func:`urlencode`
- function below.
+ If the *url* uses the :file:`http:` scheme identifier, the optional *data*
+ argument may be given to specify a ``POST`` request (normally the request type
+ is ``GET``). The *data* argument must in standard
+ :mimetype:`application/x-www-form-urlencoded` format; see the :func:`urlencode`
+ function below.
- .. attribute:: version
+ .. attribute:: version
- Variable that specifies the user agent of the opener object. To get
- :mod:`urllib` to tell servers that it is a particular user agent, set this in a
- subclass as a class variable or in the constructor before calling the base
- constructor.
+ Variable that specifies the user agent of the opener object. To get
+ :mod:`urllib` to tell servers that it is a particular user agent, set this in a
+ subclass as a class variable or in the constructor before calling the base
+ constructor.
.. class:: FancyURLopener(...)