HTTP POST Implementation

Michael Ströder michael at stroeder.com
Thu Sep 21 06:49:12 EDT 2000


Brendan Leong See wrote:
> 
> > This module builds on SimpleHTTPServer by implementing GET and POST
> > requests to cgi-bin scripts.
> 
> Yes I've noticed the CGI implementation, but this seems only to support CGI
> related POSTing and I get error msgs (501) when I try to use it for other
> reasons.

What prevents you from deriving your own handler class and do
anything you want in do_POST()?

class HTTPHandlerClass(SimpleHTTPServer.SimpleHTTPRequestHandler):

  def do_POST(self):
    """
    Place your fancy POST handler below here
    """

Ciao, michael.



More information about the Python-list mailing list