diff options
author | Georg Brandl <georg@python.org> | 2006-02-17 13:34:16 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-02-17 13:34:16 (GMT) |
commit | 5d076961e285a74d3d5aeae88a52517c38c44846 (patch) | |
tree | d950098a3f739e74179fb91c21274749753bb5fd /Doc/lib/libsimplehttp.tex | |
parent | bcd548bdb2f40bd739c6ff40f5903c74c190bc23 (diff) | |
download | cpython-5d076961e285a74d3d5aeae88a52517c38c44846.zip cpython-5d076961e285a74d3d5aeae88a52517c38c44846.tar.gz cpython-5d076961e285a74d3d5aeae88a52517c38c44846.tar.bz2 |
Patch #1417555: SimpleHTTPServer now returns Last-Modified headers.
Diffstat (limited to 'Doc/lib/libsimplehttp.tex')
-rw-r--r-- | Doc/lib/libsimplehttp.tex | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/lib/libsimplehttp.tex b/Doc/lib/libsimplehttp.tex index c30eaa8..efb40ec 100644 --- a/Doc/lib/libsimplehttp.tex +++ b/Doc/lib/libsimplehttp.tex @@ -65,13 +65,18 @@ error. Otherwise, the content type is guessed by calling the \var{extensions_map} variable. A \code{'Content-type:'} header with the guessed content type is -output, followed by a blank line signifying the end of the headers, +output, followed by a \code{'Content-Length:'} header with the file's +size and a \code{'Last-Modified:'} header with the file's modification +time. + +Then follows a blank line signifying the end of the headers, and then the contents of the file are output. If the file's MIME type starts with \code{text/} the file is opened in text mode; otherwise binary mode is used. For example usage, see the implementation of the \function{test()} function. +\versionadded[The \code{'Last-Modified'} header]{2.5} \end{methoddesc} |