BaseHTTPServer

HTTP server base class.

Note: the class in this module doesn’t implement any HTTP request; see SimpleHTTPServer for simple implementations of GET, HEAD and POST (including CGI scripts). It does, however, optionally implement HTTP/1.1 persistent connections, as of version 0.3.

Contents:

  • BaseHTTPRequestHandler: HTTP request handler base class
  • test: test function

XXX To do:

  • log requests even later (to capture byte count)
  • log user-agent header and other interesting goodies
  • send error log to separate file

Functions

filterwarnings(action[, message, category, ...]) Insert an entry into the list of warnings filters (at the front).
test([HandlerClass, ServerClass, protocol]) Test the HTTP request handler class.

Classes

BaseHTTPRequestHandler(request, ...) HTTP request handler base class.
HTTPServer(server_address, RequestHandlerClass)
catch_warnings([record, module]) A context manager that copies and restores the warnings filter upon exiting the context.