Referrer key missing form os.environ dictionary?
Chris “Kwpolska” Warrick
kwpolska at gmail.com
Wed Sep 25 10:01:34 EDT 2013
On Wed, Sep 25, 2013 at 2:45 PM, Νίκος <nikos.gr33k at gmail.com> wrote:
> Hello, i decided am ong other os.environ variables to also grab the
> 'HTTP_REFERER' fiel but when i try to run my script i was seeing a KeyError
> complaining that 'HTTP_REFERER' didnt exist.
>
> So, to see what existed in the os.environ dictionary i issues a print(
> os.environ ) to see all available keys and their values:
The Referer header is not mandatory by any means. Your client
probably does not send it.
--
Chris “Kwpolska” Warrick <http://kwpolska.tk>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense
More information about the Python-list
mailing list