Maybe someone out there with more HTTP experience than me can answer this question. If I have a CGI script that issues a redirect using the `Location:' header, I can get the Web browser to go to the relocated page with no problem. It even still shows the original URL in browser. Cool so far.
However, if what I'm doing is posting some form data, the browser gets redirected, but the form data doesn't get reposted to the new URL. Verified under NS4/Unix and IE3. This is a real pain for something I'm trying to add to Mailman.
I'm sure there's some haughty security justification for the non-reposting of form data, so the natural question is: can I get around this? :-)
Thanks, -Barry
Barry A. Warsaw wrote:
[Redirecting POST] I'm sure there's some haughty security justification for the non-reposting of form data, so the natural question is: can I get around this? :-)
I don't think so. You either have to post to the "other" URL yourself in the CGI script (eek), or try to attach your parameters, URL-encoded, to the URL (as a GET request). The latter aproach looks ugly in browsers (and might reveal passwords in clear text), and the former might be a security problem (if access to the "other" CGI script is restricted).
OTOH, if you're on the same server, you could just exec (or "import") the "other" CGI script directly from the local file system.
I don't think that there is a portable way to redirect POSTs.
Yours, Markus.
participants (2)
-
Barry A. Warsaw
-
Markus Fleck