How to get CGI request-URL

Hallvard B Furuseth (nospam nospam) h.b.furuseth at usit.uio.no
Fri Jul 4 14:02:59 EDT 2003


How can I get the URL the user typed (except the part after '?') with
the cgi module?

I expect the 'Host:' HTTP header + os.environ['SCRIPT_NAME'] would do
it, but I don't see how to find the Host header.  The www server has
several names, so I can't just use the default host name.

-- 
Hallvard




More information about the Python-list mailing list