Determining from which web page a cgi script is invoked?
Tim Chase
python.list at tim.thechases.com
Tue Mar 10 06:02:04 EDT 2009
davidgould at davidgould.com wrote:
> Given a webpage test.html that has a form with a cgi script, how can
> you determine inside the cgi script the name of the webpage that
> invoked the script?
>
> I have many different html pages that use a common cgi script for form
> processing and want to determine the name of the webpage.
Not that this has anything to do with python...but you're
interested in the standard "referrer"/"referer" field[1] in your
request headers. Note that this field IS OPTIONAL. Firefox
makes it easy to keep the referrer private, so it's never sent.
-tkc
[1]
http://en.wikipedia.org/wiki/Referer
More information about the Python-list
mailing list