Package django :: Package core :: Package servers :: Module basehttp
[hide private]
[frames] | no frames]

Module basehttp

source code

BaseHTTPServer that implements the Python WSGI protocol (PEP 333, rev 1.21).

Adapted from wsgiref.simple_server: http://svn.eby-sarna.com/wsgiref/

This is a simple server for use in testing or debugging Django apps. It hasn't been reviewed for security issues. Don't use it for production use.


Version: 0.1

Classes [hide private]
  WSGIServerException
  FileWrapper
Wrapper to convert file-like objects to iterables
  Headers
Manage a collection of HTTP response headers
  ServerHandler
Manage the invocation of a WSGI application
  WSGIServer
BaseHTTPServer that implements the Python WSGI protocol
  WSGIRequestHandler
  AdminMediaHandler
WSGI middleware that intercepts calls to the admin media directory, as defined by the ADMIN_MEDIA_PREFIX setting, and serves those images.
Functions [hide private]
 
_formatparam(param, value=None, quote=1)
Convenience function to format and return a key=value pair.
source code
 
guess_scheme(environ)
Return a guess for whether 'wsgi.url_scheme' should be 'http' or 'https'
source code
 
is_hop_by_hop(header_name)
Return true if 'header_name' is an HTTP/1.1 "Hop-by-Hop" header
source code
 
run(addr, port, wsgi_handler) source code
Variables [hide private]
  server_version = 'WSGIServer/0.1'
  sys_version = 'Python/2.5.2'
  software_version = 'WSGIServer/0.1 Python/2.5.2'
  tspecials = re.compile(r'[ \(\)<>@,;:\\"/\[\]\?=]')
  _hop_headers = {'connection': 1, 'keep-alive': 1, 'proxy-authe...
Function Details [hide private]

_formatparam(param, value=None, quote=1)

source code 

Convenience function to format and return a key=value pair.

This will quote the value if needed or if quote is true.


Variables Details [hide private]

_hop_headers

Value:
{'connection': 1,
 'keep-alive': 1,
 'proxy-authenticate': 1,
 'proxy-authorization': 1,
 'te': 1,
 'trailers': 1,
 'transfer-encoding': 1,
 'upgrade': 1}