[OT] minimalist web server

Michael Ströder michael at stroeder.com
Sun Dec 2 08:21:01 EST 2007


Paul Rubin wrote:
>> from SimpleHTTPServer import SimpleRequestHandler
>> handler = HTTPServer (('', 8000), SimpleRequestHandler)
> 
> 
> I think you mean SimpleHTTPRequestHandler.  Note that actually reads
> the url path and looks in the file system to get the file of that
> name, which isn't what the OP wanted.

But it's very easy to override the handler method and return the 404 for
each and every request.

Ciao, Michael.



More information about the Python-list mailing list