[Tutor] Redirect from a CGI script
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Sat Jan 20 19:13:05 CET 2007
On Sat, 20 Jan 2007, Paulino wrote:
> Still doesn't work.
[some text cut]
> I tryed all the sugestions from Andre with no succes.
>
> The cgi script as only these two lines:
> 'print "Content-type: text/html\r\n"
> 'print "Location: http://python.org/\r\n\r"
Ok, good.
The last line of the program looks suspicious. If it helps, let me
rearrange the program that you've written to:
###############################################
print "Content-type: text/html\r\n"
print "Location: http://python.org/\r\n"
print "\r"
###############################################
The code is missing the critical '\n' that allows the web browser to
recognize the header.
More information about the Tutor
mailing list