This is usually a string explaining the reason for this error.
+ .. attribute:: headers
+
+ The HTTP response headers for the HTTP request that cause the
+ :exc:`HTTPError`.
+
+ .. versionadded:: 3.4
+
.. exception:: ContentTooShortError(msg, content)
- This exception is raised when the :func:`urlretrieve` function detects that
+ This exception is raised when the :func:`~urllib.request.urlretrieve`
+ function detects that
the amount of the downloaded data is less than the expected amount (given by
the *Content-Length* header). The :attr:`content` attribute stores the
downloaded (and supposedly truncated) data.
.. versionchanged:: 3.2
This method is applicable only for local hostnames. When a remote
- hostname is given, an :exc:`URLError` is raised.
+ hostname is given, an :exc:`~urllib.error.URLError` is raised.
+.. _data-handler-objects:
+
+DataHandler Objects
+-------------------
+
+.. method:: DataHandler.data_open(req)
+
+ Read a data URL. This kind of URL contains the content encoded in the URL
+ itself. The data URL syntax is specified in :rfc:`2397`. This implementation
+ ignores white spaces in base64 encoded data URLs so the URL may be wrapped
+ in whatever source file it comes from. But even though some browsers don't
+ mind about a missing padding at the end of a base64 encoded data URL, this
+ implementation will raise an :exc:`ValueError` in that case.
+
+
.. _ftp-handler-objects:
FTPHandler Objects