[kw-pm] Redirecting using Perl
max at alleged.net
Fri Apr 30 08:25:05 PDT 2010
The browser is not even required to provide a Referer header, so you
shouldn't rely on it.
You should use a hidden item in the form to provide some known piece of
data so you'll know where it came from.
Robert Pike wrote:
> Hi All,
> I came across this when trying to redirect to another page in a CGI app I'm working on.
> I have a script (for simplicity, let's called it scriptA) that basically processes some data and then redirects to another perl script (again let's call this scriptB) that presents to the user a form to fill out. This "form" script's action property is set to recall itself. The thing is I'm trying to check (within scriptB) to see if the current script and the previous script are the same - when I make that recursive call back. First time the form gets submitted, the 2 are different still because the referer is still known to be scriptA and not scriptB. Is there a simple way to replace scriptA with scriptB first time when the form loads?
> I hope that makes sense. If so, any help would be appreciated. Thanks again.
> kw-pm mailing list
> kw-pm at pm.org
More information about the kw-pm