is no index.htm[l] file, and when it is called, it also spits out the
headers. When an index.htm[l] file is present, the regular (file
access) path is followed. Also, when the guessed content-type matches
text/*, open the file in text mode; otherwise in binary mode.
In SimpleHTTPServer.py, the server specified in test() should
be BaseHTTPServer.HTTPServer, in case the request handler should
want to reference the two attributes added by
BaseHTTPServer.server_bind:
self.server_name = hostname
self.server_port = port
There was some Bobo CGI code that wanted access to those attributes.