minor wording changes, rewrap a few lines
This commit is contained in:
parent
4f1f36bcab
commit
ef1e58b6f3
@ -7,39 +7,40 @@
|
|||||||
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
|
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
|
||||||
|
|
||||||
|
|
||||||
The :mod:`SimpleHTTPServer` module defines a request-handler class,
|
The :mod:`SimpleHTTPServer` module defines a single class,
|
||||||
interface-compatible with :class:`BaseHTTPServer.BaseHTTPRequestHandler`, that
|
:class:`SimpleHTTPRequestHandler`, which is interface-compatible with
|
||||||
serves files only from a base directory.
|
:class:`BaseHTTPServer.BaseHTTPRequestHandler`.
|
||||||
|
|
||||||
The :mod:`SimpleHTTPServer` module defines the following class:
|
The :mod:`SimpleHTTPServer` module defines the following class:
|
||||||
|
|
||||||
|
|
||||||
.. class:: SimpleHTTPRequestHandler(request, client_address, server)
|
.. class:: SimpleHTTPRequestHandler(request, client_address, server)
|
||||||
|
|
||||||
This class is used to serve files from the current directory and below, directly
|
This class serves files from the current directory and below, directly
|
||||||
mapping the directory structure to HTTP requests.
|
mapping the directory structure to HTTP requests.
|
||||||
|
|
||||||
A lot of the work, such as parsing the request, is done by the base class
|
A lot of the work, such as parsing the request, is done by the base class
|
||||||
:class:`BaseHTTPServer.BaseHTTPRequestHandler`. This class implements the
|
:class:`BaseHTTPServer.BaseHTTPRequestHandler`. This class implements the
|
||||||
:func:`do_GET` and :func:`do_HEAD` functions.
|
:func:`do_GET` and :func:`do_HEAD` functions.
|
||||||
|
|
||||||
The :class:`SimpleHTTPRequestHandler` defines the following member variables:
|
The following are defined as class-level attributes of
|
||||||
|
:class:`SimpleHTTPRequestHandler`:
|
||||||
|
|
||||||
|
|
||||||
.. attribute:: server_version
|
.. attribute:: server_version
|
||||||
|
|
||||||
This will be ``"SimpleHTTP/" + __version__``, where ``__version__`` is
|
This will be ``"SimpleHTTP/" + __version__``, where ``__version__`` is
|
||||||
defined in the module.
|
defined at the module level.
|
||||||
|
|
||||||
|
|
||||||
.. attribute:: extensions_map
|
.. attribute:: extensions_map
|
||||||
|
|
||||||
A dictionary mapping suffixes into MIME types. The default is signified by
|
A dictionary mapping suffixes into MIME types. The default is
|
||||||
an empty string, and is considered to be ``application/octet-stream``. The
|
signified by an empty string, and is considered to be
|
||||||
mapping is used case-insensitively, and so should contain only lower-cased
|
``application/octet-stream``. The mapping is used case-insensitively,
|
||||||
keys.
|
and so should contain only lower-cased keys.
|
||||||
|
|
||||||
The :class:`SimpleHTTPRequestHandler` defines the following methods:
|
The :class:`SimpleHTTPRequestHandler` class defines the following methods:
|
||||||
|
|
||||||
|
|
||||||
.. method:: do_HEAD()
|
.. method:: do_HEAD()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user