Referrer key missing form os.environ dictionary?
Grant Edwards
invalid at invalid.invalid
Wed Sep 25 14:37:27 EDT 2013
On 2013-09-25, ?????????? <nikos.gr33k at gmail.com> wrote:
> ???????? 25/9/2013 6:18 ????, ??/?? Grant Edwards ????????????:
>>> The Referer is not an environment variable.
>>
>> It is when you're writing a CGI app.
>>
>>> How would your shell know what URL you were just browsing?
>>
>> Because the HTTP server sets those environment variables before
>> invoking the CGI app.
>
> So you mean that even if i run it via shell this stement will also
> work
If the shell was started by the HTTP server, yes. If you logged in
normally, no.
> because it happens to be in the same enviroment with the HTTP server?
The shell will only have that environment if the shell was run by the
HTTP server.
> No need to run it via web browser and check the Apache's error log?
You can set the environemnt variables appropriately in the shell and
then invoke a CGI application directly for testing purposes.
--
Grant Edwards grant.b.edwards Yow! I was born in a
at Hostess Cupcake factory
gmail.com before the sexual
revolution!
More information about the Python-list
mailing list