finding domain name

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Tue Sep 23 17:28:05 CEST 2008

Bobby Roberts a écrit :
> On Sep 23, 9:10 am, Tino Wildenhain <t... at> wrote:
>> Bobby Roberts wrote:
>>>> Depends on the technology/web framework. If you use WSGI, you should use
>>>> something like:
>>>> host_name = environ.get("HTTP_HOST", None) or environ["SERVER_NAME"]
>>>> -- Gerhard
>>> Yeah i already tried environ("SERVER_NAME") but get a key error when i
>>> do.
>> You could output the whole environ to see what you get and how it is called.
>> I'd recommend however to check that you are using a configured value and
>> not something sent by the client if you are going to use it during
>> filesystem lookup.
>> Regards
>> Tino
>>  smime.p7s
>> 4KViewDownload
> evidently the environ dictionary is off limits on our server.


> It can't
> be that tough in python to get the current complete url being viewed.
> It's a snap in asp(which is my background).

Please don't compare apples to roller-skates. asp is a mix of libraries, 
components and whatever, while Python is a language.

More information about the Python-list mailing list