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: 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: References: Date: Wed, 25 Sep 2013 16:01:34 +0200 Subject: Re: Referrer key missing form os.environ dictionary? From: =?UTF-8?B?Q2hyaXMg4oCcS3dwb2xza2HigJ0gV2Fycmljaw==?= To: =?UTF-8?B?zp3Or866zr/Pgg==?= 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Wed, Sep 25, 2013 at 2:45 PM, =CE=9D=CE=AF=CE=BA=CE=BF=CF=82 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 KeyErr= or > 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. --=20 Chris =E2=80=9CKwpolska=E2=80=9D Warrick PGP: 5EAAEA16 stop html mail | always bottom-post | only UTF-8 makes sense