[ python-Bugs-866222 ] SimpleHTTPServer docs out of date
SourceForge.net
noreply at sourceforge.net
Sat Aug 7 21:12:48 CEST 2004
Bugs item #866222, was opened at 2003-12-27 01:18
Message generated for change (Comment added) made by akuchling
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=866222&group_id=5470
Category: Documentation
Group: Python 2.3
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Gabriel Genellina (gagenellina)
>Assigned to: A.M. Kuchling (akuchling)
Summary: SimpleHTTPServer docs out of date
Initial Comment:
The Library documentation about SimpleHTTPServer.
py is out of date:
In extensions_map:
Default is signified by an empty string, and is
considered to be text/plain.[...]
should read
Default is signified by an empty string, and is
considered to be application/octet-stream.
In do_GET:
If the request was mapped to a directory, a 403
respond is output, followed by the explanation
'Directory listing not supported'. Any IOError [...]
should read:
If the request was mapped to a directory, a file
named index.html or index.htm (in that order) is
searched inside it. If found, then its contents are
returned; otherwise a directory listing is generated
using os.listdir. (In case the os.listdir call fails, a 404
error response is sent).
Any IOError [...]
Later in do_GET:
The file is always opened in binary mode.
should read:
If the file MIME type starts with 'text/' the file is
opened in text mode; in any other case binary mode
is used.
The docstrings inside the module are outdated too.
Line 28 (class SimpleHTTPRequestHandler) says:
It assumes that all files are plain text files unless
they have the extension ".html" in which case it
assumes they are HTML files.
That's not true; that paragraph should be deleted,
or make a reference to method guess_type() below.
Docstring for method guess_type() says:
[...] using text/plain as a default [...]
should read:
[...] using application/octet-stream as a default [...]
----------------------------------------------------------------------
>Comment By: A.M. Kuchling (akuchling)
Date: 2004-08-07 15:12
Message:
Logged In: YES
user_id=11375
Fixed on both the CVS HEAD and the 2.3 branch. Thanks for reporting
this!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=866222&group_id=5470
More information about the Python-bugs-list
mailing list