cgi problem

Thomas Guettler niemand.leermann at thomas-guettler.de
Thu Mar 9 16:55:25 CET 2006


Am Thu, 09 Mar 2006 00:35:25 -0800 schrieb Paul Rubin:

> Tim Roberts <timr at probo.com> writes:
>> Yes, but the CGI module doesn't write anything, so the advice of writing a
>> "Location:" header still applies.
> 
> Aha, it's coming from CGIHTTPServer.py:CGIHTTPRequestHandler.run_cgi()
> where it says
> 
>         self.send_response(200, "Script output follows")
> 
> I got the two modules confused.  This still leaves me with the same
> basic problem, how to suppress the sending of that header.

I had this problem, too:

https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1055159&group_id=5470

CGIHTTPServer writes "200" before the script gets executed!

You can return this:
"""<html>
 <head> 
   <meta http-equiv="refresh" 
         content="1; url=...">
 </head>
</html>"""


 Thomas

-- 
Thomas Güttler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
Spam Catcher: niemand.leermann at thomas-guettler.de




More information about the Python-list mailing list