Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #54731

Re: Referrer key missing form os.environ dictionary?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <kwpolska@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'subject:form': 0.07; 'subject:missing': 0.07; 'utf-8': 0.07; 'variables': 0.07; 'cc:addr:python-list': 0.11; 'complaining': 0.16; 'exist.': 0.16; 'keyerror': 0.16; 'means.': 0.16; 'os.environ': 0.16; 'subject:key': 0.16; 'values:': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'cc:addr:python.org': 0.22; 'header': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'script': 0.25; 'header:In-Reply- To:1': 0.27; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; "skip:' 10": 0.31; '25,': 0.31; 'didnt': 0.31; 'keys': 0.31; 'sep': 0.31; 'probably': 0.32; 'run': 0.32; 'sense': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'so,': 0.37; 'pm,': 0.38; 'does': 0.39; 'from:charset:utf-8': 0.61; 'decided': 0.64; 'grab': 0.64; 'skip:\xe2 10': 0.65; 'to:addr:gmail.com': 0.65; '8bit%:43': 0.74; 'url:tk': 0.95; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=tzuViqOAWjOorBeIwOic+loKJxBCp9CuJ40G4ZGWm10=; b=Vtc+TXPRvA4K/mEF/XxN9h3YYDCZvBp7hu0LaJCWVTp7CkJEoHJ2EhRFcGMJGtNdjV YGeoxACuenW+hoZY7+djNVny+2VgMY2gEj/1RefS9w42lJTxzaFg9DKiJrdhGuzlhivT lrkiNrbaPAIaL+ANdpnf0CRw9op/gaJrl4RcKkQ3BR3v49Ykg9O9EzHUBX9zF76CE1CA p52hALJ9+UQ2NhZnvsxcBNCCwevAbmqdpzQefHfcB/wbHNyy7eODSOalqPAHDqeztTOb EY+fZjFmiZN/zCNtoK16NmLYQYtjzV6sYy+Pl3c3s8xjyIxdhaGQr6p2hlXvc4OONhoQ 5hOw==
MIME-Version 1.0
X-Received by 10.42.52.129 with SMTP id j1mr9383204icg.5.1380117694916; Wed, 25 Sep 2013 07:01:34 -0700 (PDT)
In-Reply-To <l1ulsv$4mv$1@dont-email.me>
References <l1ulsv$4mv$1@dont-email.me>
Date Wed, 25 Sep 2013 16:01:34 +0200
Subject Re: Referrer key missing form os.environ dictionary?
From Chris “Kwpolska” Warrick <kwpolska@gmail.com>
To Νίκος <nikos.gr33k@gmail.com>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.315.1380117704.18130.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1380117704 news.xs4all.nl 15923 [2001:888:2000:d::a6]:41852
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:54731

Show key headers only | View raw


On Wed, Sep 25, 2013 at 2:45 PM, Νίκος <nikos.gr33k@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Referrer key missing form os.environ dictionary? Νίκος <nikos.gr33k@gmail.com> - 2013-09-25 15:45 +0300
  Re: Referrer key missing form os.environ dictionary? Νίκος <nikos.gr33k@gmail.com> - 2013-09-25 16:14 +0300
  Re: Referrer key missing form os.environ dictionary? Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-09-25 16:01 +0200
    Re: Referrer key missing form os.environ dictionary? Νίκος <nikos.gr33k@gmail.com> - 2013-09-25 17:04 +0300
      Re: Referrer key missing form os.environ dictionary? John Gordon <gordon@panix.com> - 2013-09-25 14:26 +0000
        Re: Referrer key missing form os.environ dictionary? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-25 15:04 +0000
          Re: Referrer key missing form os.environ dictionary? Νίκος <nikos.gr33k@gmail.com> - 2013-09-25 18:16 +0300
            Re: Referrer key missing form os.environ dictionary? Tim Chase <python.list@tim.thechases.com> - 2013-09-25 10:42 -0500
            Re: Referrer key missing form os.environ dictionary? Denis McMahon <denismfmcmahon@gmail.com> - 2013-09-25 21:17 +0000
        Re: Referrer key missing form os.environ dictionary? Ned Batchelder <ned@nedbatchelder.com> - 2013-09-25 11:09 -0400
      Re: Referrer key missing form os.environ dictionary? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-25 14:52 +0000
        Re: Referrer key missing form os.environ dictionary? Νίκος <nikos.gr33k@gmail.com> - 2013-09-25 18:02 +0300
          Re: Referrer key missing form os.environ dictionary? Xaxa Urtiz <urtizvereaxaxa@gmail.com> - 2013-09-25 08:09 -0700
          Re: Referrer key missing form os.environ dictionary? Tim Chase <python.list@tim.thechases.com> - 2013-09-25 10:14 -0500
            Re: Referrer key missing form os.environ dictionary? Νίκος <nikos.gr33k@gmail.com> - 2013-09-25 18:35 +0300
        Re: Referrer key missing form os.environ dictionary? Grant Edwards <invalid@invalid.invalid> - 2013-09-25 15:18 +0000
          Re: Referrer key missing form os.environ dictionary? Νίκος <nikos.gr33k@gmail.com> - 2013-09-25 18:41 +0300
            Re: Referrer key missing form os.environ dictionary? John Gordon <gordon@panix.com> - 2013-09-25 16:27 +0000
            Re: Referrer key missing form os.environ dictionary? Grant Edwards <invalid@invalid.invalid> - 2013-09-25 18:37 +0000
          Re: Referrer key missing form os.environ dictionary? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-26 00:11 +0000
            Re: Referrer key missing form os.environ dictionary? Terry Reedy <tjreedy@udel.edu> - 2013-09-25 21:32 -0400
            Re: Referrer key missing form os.environ dictionary? Chris Angelico <rosuav@gmail.com> - 2013-09-26 13:25 +1000
              Re: Referrer key missing form os.environ dictionary? Grant Edwards <invalid@invalid.invalid> - 2013-09-26 14:16 +0000
            Re: Referrer key missing form os.environ dictionary? Robert Kern <robert.kern@gmail.com> - 2013-09-26 11:15 +0100
            Re: Referrer key missing form os.environ dictionary? Grant Edwards <invalid@invalid.invalid> - 2013-09-26 14:11 +0000
              Re: Referrer key missing form os.environ dictionary? Chris Angelico <rosuav@gmail.com> - 2013-09-27 01:17 +1000
                Re: Referrer key missing form os.environ dictionary? Grant Edwards <invalid@invalid.invalid> - 2013-09-26 23:27 +0000
                Re: Referrer key missing form os.environ dictionary? Chris Angelico <rosuav@gmail.com> - 2013-09-27 16:01 +1000
    Re: Referrer key missing form os.environ dictionary? Νίκος <nikos.gr33k@gmail.com> - 2013-09-25 17:07 +0300
      Re: Referrer key missing form os.environ dictionary? Robert Kern <robert.kern@gmail.com> - 2013-09-25 15:26 +0100
      Re: Referrer key missing form os.environ dictionary? John Gordon <gordon@panix.com> - 2013-09-25 14:30 +0000
      Re: Referrer key missing form os.environ dictionary? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-25 14:46 +0000
      Re: Referrer key missing form os.environ dictionary? Piet van Oostrum <piet@vanoostrum.org> - 2013-09-25 15:59 -0400
  Re: Referrer key missing form os.environ dictionary? John Gordon <gordon@panix.com> - 2013-09-25 14:18 +0000
    Re: Referrer key missing form os.environ dictionary? Tim Chase <python.list@tim.thechases.com> - 2013-09-25 09:58 -0500

csiph-web