Package shttp :: Module http :: Class HTTPRequestHandler
[show private | hide private]
[frames | no frames]

Class HTTPRequestHandler

BaseRequestHandler --+                
                     |                
  StreamRequestHandler --+            
                         |            
    BaseHTTPRequestHandler --+        
                             |        
      SimpleHTTPRequestHandler --+    
                                 |    
             CGIHTTPRequestHandler --+
                                     |
                                    HTTPRequestHandler


Method Summary
  check_script_sanity(self, scriptname, scriptfile)
Returns True if running the script is OK, False otherwise
  get_environ(self)
Execute a CGI script.
  is_cgi(self)
Checks if the URI corresponds to a CGI or a Python Handler
  run_cgi(self)
Execute a CGI script.
  setup(self)
  translate_path(self, path, root)
Translate a /-separated PATH to the local filename syntax.
    Inherited from CGIHTTPRequestHandler
  do_POST(self)
Serve a POST request.
  is_executable(self, path)
Test whether argument path is an executable file.
  is_python(self, path)
Test whether argument path is a Python script.
  send_head(self)
Version of send_head that support CGI scripts
    Inherited from SimpleHTTPRequestHandler
  copyfile(self, source, outputfile)
Copy all data between two file objects.
  do_GET(self)
Serve a GET request.
  do_HEAD(self)
Serve a HEAD request.
  guess_type(self, path)
Guess the type of a file.
  list_directory(self, path)
Helper to produce a directory listing (absent index.html).
    Inherited from BaseHTTPRequestHandler
  address_string(self)
Return the client address formatted for logging.
  date_time_string(self)
Return the current date and time formatted for a message header.
  end_headers(self)
Send the blank line ending the MIME headers.
  handle(self)
Handle multiple requests if necessary.
  handle_one_request(self)
Handle a single HTTP request.
  log_date_time_string(self)
Return the current time formatted for logging.
  log_error(self, *args)
Log an error.
  log_message(self, format, *args)
Log an arbitrary message.
  log_request(self, code, size)
Log an accepted request.
  parse_request(self)
Parse a request (internal).
  send_error(self, code, message)
Send and log an error reply.
  send_header(self, keyword, value)
Send a MIME header.
  send_response(self, code, message)
Send the response header and log the response code.
  version_string(self)
Return the server software version string.
    Inherited from StreamRequestHandler
  finish(self)
    Inherited from BaseRequestHandler
  __init__(self, request, client_address, server)

Class Variable Summary
    Inherited from CGIHTTPRequestHandler
list cgi_directories = ['/cgi-bin', '/htbin']
bool have_fork = True
bool have_popen2 = True
bool have_popen3 = True
int rbufsize = 0                                                                     
    Inherited from SimpleHTTPRequestHandler
dict extensions_map = {'': 'application/octet-stream', '.obj'...
str server_version = 'SimpleHTTP/0.6'
    Inherited from BaseHTTPRequestHandler
str error_message_format = '<head>\n<title>Error response</t...
list monthname = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'J...
str protocol_version = 'HTTP/1.0'
dict responses = {400: ('Bad request', 'Bad request syntax or...
str sys_version = 'Python/2.4.3'
list weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat',...
    Inherited from StreamRequestHandler
int wbufsize = 0                                                                     

Method Details

check_script_sanity(self, scriptname, scriptfile)

Returns True if running the script is OK, False otherwise

get_environ(self)

Execute a CGI script.

is_cgi(self)

Checks if the URI corresponds to a CGI or a Python Handler
Overrides:
CGIHTTPServer.CGIHTTPRequestHandler.is_cgi

run_cgi(self)

Execute a CGI script.
Overrides:
CGIHTTPServer.CGIHTTPRequestHandler.run_cgi

translate_path(self, path, root=None)

Translate a /-separated PATH to the local filename syntax.

Components that mean special things to the local file system (e.g. drive or directory names) are ignored. (XXX They should probably be diagnosed.)
Overrides:
SimpleHTTPServer.SimpleHTTPRequestHandler.translate_path

Generated by Epydoc 2.1 on Sat Oct 14 11:50:52 2006 http://epydoc.sf.net