Using BaseHTTPServer.BaseHTTPRequestHandler
Lars von Wedel
lvw at lfpt.rwth-aachen.de
Fri Jul 28 10:55:11 EDT 2000
Hello,
I have built a standalone HTTP server using the class
BaseHTTPServer.BaseHTTPRequestHandler from which I derived
my own handler.
My main focus is on the do_GET() method, in which I disassemble
the self.path variable that has been preprocessed into the query
arguments (using cgi.parse_qs).
My problem is that when I print a header with a 'Content-type',
the corresponding line appears in the browser client, so obviously
somebody printed the header before. That way, I can only output html
pages, which is not what I want. However, I cannot find any
class involved that could cause this.
Who knows help?
Regards,
Lars
More information about the Python-list
mailing list