CGIHTTPServer always return 200, no redirects (302) possible

S

Steve Holden

Thomas said:
Hi,

The CGIHTTPServer returns

self.send_response(200, "Script output follows")

before it starts the cgi process. This means
you cannot set the status header to 302 for
a redirect.

I don't see a easy and portable way to fix this.

CGIHTTPServer.py:
http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Lib/CGIHTTPServer.py?rev=1.36&view=auto

Maybe a little note in the docs would save some
people 30-60 minutes of their sparetime.

Thomas
If you'd spent the time it took to post your message posting a doc patch
instead then you'd have saved us boith some time ;-)

regards
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top