CGI Redirect
Erno Kuusela
erno-news at erno.iki.fi
Tue May 1 15:26:03 EDT 2001
In article <mailman.988737725.16327.python-list at python.org>, Gabriel
Ambuehl <gabriel_ambuehl at buz.ch> writes:
| As said, IMHO, you shouldn't have the print "Content-type:
| text/html\n\n" statement, since after that, no browser will care for
| the location header anymore.
not quite... the user agent doesn't use the presence of the location
header to decide if it's a redirect, it looks at the http status code
(which is 30x for redirects).
from <URL:http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.3>:
--
Unless the request method was HEAD, the entity of the response
SHOULD contain a short hypertext note with a hyperlink to the new
URI(s).
--
| There may be only ONE HTTP header per response/request, IIRC.
actually they normally have many headers.
-- erno
More information about the Python-list
mailing list