return a default form with BaseHTTPServer

Jeff Gercken jgercken at
Mon Jan 9 16:58:09 CET 2006

I want my http server to return a default form, regardless of the GET
request, but I'm a bit of a noob and have no idea how.  I'm trying to
write a platform-independent captured portal for my wireless AP.  This
is what I have:

#!/usr/bin/env python
import CGIHTTPServer
import BaseHTTPServer
class ServerHandler(CGIHTTPServer.CGIHTTPRequestHandler):
    cgi_directories=[ '/cgi-bin' ]
httpserver = BaseHTTPServer.HTTPServer(("", 80), ServerHandler)

Many thanks,

More information about the Python-list mailing list