pyweblib.httphelper (version 0.0.3)
index
/usr/lib/python2.2/site-packages/pyweblib/httphelper.py

httphelper.py - basic HTTP-related functions
(c) by Michael Stroeder <michael@stroeder.com>
 
This module is distributed under the terms of the
GPL (GNU GENERAL PUBLIC LICENSE) Version 2
(see http://www.gnu.org/copyleft/gpl.html)
 
$Id: pyweblib.httphelper.html,v 1.6 2002/02/01 12:57:21 michael Exp $

 
Modules
            
sys
time
 
Functions
            
DateTimeRFC1123(secs=0)
Return seconds as RFC1123 date/time format preferred
for HTTP 1.1 (see RFC2616)
SendHeader(outf=<open file '<stdout>', mode 'w'>, contenttype='text/html', charset='ISO-8859-1', contentlength=None, expires_offset=0, lastmodified=None, additional_header={})
Generate HTTP header
 
outf                          File object used for sending to client.
contenttype='text/html',      MIME type of object in HTTP body.
charset='ISO-8859-1',         Character set used.
contentlength=None,           Content-Length if known and
                              gzip-encoding is not used.
expires_offset=0,             Expiry time from current time in seconds.
lastmodified=None,            Last-modified time.
additional_header = {}        Dictionary containing arbitrary
                              additional HTTP header fields.
URLRedirect(outf, url, refreshtime=0, msg='Redirecting...')
Output HTML text with redirecting <head> section.
 
Data
             HTTP_LINESEP = '\r\n'
__file__ = '/usr/lib/python2.2/site-packages/pyweblib/httphelper.pyc'
__name__ = 'pyweblib.httphelper'
__version__ = '0.0.3'