CGI: how to get referer header?

Thomas Guettler pan-newsreader at thomas-guettler.de
Sat Mar 22 08:02:11 EST 2003


On Sat, 22 Mar 2003 13:07:09 +0100, nihilo wrote:

> I am trying to get the referer and user agent headers in a cgi program
> I'm writing. I haven't been able to find any clear information on how to
> do this, but I've been trying the following:
> 
> referer = cgi.parse_header('Referer') agent =
> cgi.parse_header('User-Agent')

try "HTTP_REFERER"

  thomas

-- 
Thomas Guettler <guettli at thomas-guettler.de>
http://www.thomas-guettler.de




More information about the Python-list mailing list