[Python-checkins] python/dist/src/Doc/lib libsimplehttp.tex, 1.3, 1.4

akuchling at users.sourceforge.net akuchling at users.sourceforge.net
Sat Aug 7 21:06:50 CEST 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7612

Modified Files:
	libsimplehttp.tex 
Log Message:
[Bug #866222] Update docs to match the module

Index: libsimplehttp.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsimplehttp.tex,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** libsimplehttp.tex	1 Dec 2000 15:25:23 -0000	1.3
--- libsimplehttp.tex	7 Aug 2004 19:06:48 -0000	1.4
***************
*** 34,38 ****
  \begin{memberdesc}{extensions_map}
  A dictionary mapping suffixes into MIME types. Default is signified
! by an empty string, and is considered to be \code{text/plain}.
  The mapping is used case-insensitively, and so should contain only
  lower-cased keys.
--- 34,38 ----
  \begin{memberdesc}{extensions_map}
  A dictionary mapping suffixes into MIME types. Default is signified
! by an empty string, and is considered to be \code{application/octet-stream}.
  The mapping is used case-insensitively, and so should contain only
  lower-cased keys.
***************
*** 52,64 ****
  a path relative to the current working directory.
  
! If the request was mapped to a directory, a \code{403} respond is output,
! followed by the explanation \code{'Directory listing not supported'}.
! Any \exception{IOError} exception in opening the requested file, is mapped
! to a \code{404}, \code{'File not found'} error. Otherwise, the content
! type is guessed using the \var{extensions_map} variable.
  
  A \code{'Content-type:'} with the guessed content type is output, and
  then a blank line, signifying end of headers, and then the contents of
! the file. The file is always opened in binary mode.
  
  For example usage, see the implementation of the \function{test()}
--- 52,72 ----
  a path relative to the current working directory.
  
! If the request was mapped to a directory, the directory is checked for
! a file named \code{index.html} or \code{index.htm} (in that order).
! If found, the file's contents are returned; otherwise a directory
! listing is generated by calling the \method{list_directory()} method.
! This method uses \function{os.listdir()} to scan the directory, and
! returns a \code{404} error response if the \function{listdir()} fails.
! 
! If the request was mapped to a file, it is opened and the contents are
! returned.  Any \exception{IOError} exception in opening the requested
! file is mapped to a \code{404}, \code{'File not found'}
! error. Otherwise, the content type is guessed using the
! \var{extensions_map} variable.
  
  A \code{'Content-type:'} with the guessed content type is output, and
  then a blank line, signifying end of headers, and then the contents of
! the file. 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()}



More information about the Python-checkins mailing list