[Python-bugs-list] [ python-Bugs-475166 ] Confusing code (typos?) in CGIHTTPServer

noreply@sourceforge.net noreply@sourceforge.net
Thu, 25 Oct 2001 20:40:18 -0700


Bugs item #475166, was opened at 2001-10-25 20:18
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=475166&group_id=5470

Category: Python Library
Group: Python 2.1.1
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Noah Spurrier (noah)
Assigned to: Nobody/Anonymous (nobody)
Summary: Confusing code (typos?) in CGIHTTPServer

Initial Comment:
I found the comment on line 224 of CGIHTTPServer.py to 
be confusing:
    # On Windows, use python.exe, not python.exe

Also, since do_POST() does not call send_head(),
then why do you need to handle the following 
condition in send_head() line 63???:
	if self.is_cgi():
		return self.run_cgi()
Note that do_POST() already calls self.run_cgi() on 
line 57, so why would send_head() call it?

I'm sure I'm just being a dweeb and I'm missing 
something, but if not then I hope this clears up the 
code. I'm still confused why my custom do_POST() is 
not working...

Yours,

----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-10-25 20:40

Message:
Logged In: YES 
user_id=6380

The comment should have said "python.exe, not pythonw.exe".
I've fixed this in CVS, as well as a typo on the next line.

The is_cgi() check in send_head() is for when send_head() is
called from do_GET() -- an alternative way to invoke CGI
scripts.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=475166&group_id=5470