How to get CGI request-URL

Peter Hansen peter at engcorp.com
Fri Jul 4 14:22:08 EDT 2003


Hallvard B Furuseth wrote:
> 
> 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.

This might help:  http://hoohoo.ncsa.uiuc.edu/cgi/env.html

Found via Google....




More information about the Python-list mailing list