[Tutor] CGI request handler bug?
Steve N
smnordby at yahoo.com
Fri Mar 2 22:33:13 CET 2007
> I was playing with some simple HTTP CGI server code
> and discovered what I think may be a bug in
> CGIHTTPServer.CGIHTTPRequestHandler. A "GET" request
> without a leading '/' from a telnet session displays
> the CGI script rather than the script's output. If >
the
> request includes the leading '/', the script is run
as
> expected. Is this a bug?
I think I've solved my problem by adding subclassing
CGIHTTPRequestHandler and adding this at the start of
the is_cgi() method:
if not self.path.startswith('/'):
self.path = '/' + self.path
--
SteveN
____________________________________________________________________________________
Have a burning question?
Go to www.Answers.yahoo.com and get answers from real people who know.
More information about the Tutor
mailing list