Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:form': 0.07; 'subject:missing': 0.07; 'variables': 0.07; 'alternatives': 0.09; 'http': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'variables.': 0.09; 'jan': 0.12; 'exist.': 0.16; 'invoking': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'stdout': 0.16; 'subject:key': 0.16; 'variable.': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'finished': 0.19; 'later': 0.20; '>>>': 0.22; 'input': 0.22; 'shell': 0.22; 'header :User-Agent:1': 0.23; 'parse': 0.24; 'environment': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'sets': 0.30; "i'm": 0.30; 'lines': 0.31; 'url:wiki': 0.31; 'app.': 0.31; 'cgi': 0.31; "d'aprano": 0.31; 'sep': 0.31; 'steven': 0.31; 'url:wikipedia': 0.31; 'allows': 0.31; 'could': 0.34; 'info': 0.35; 'but': 0.35; 'machine.': 0.36; 'done': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'server': 0.38; 'to:addr :python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'channel': 0.39; 'though,': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'received:173': 0.61; "you're": 0.61; 'stand': 0.64; 'more': 0.64; 'different': 0.65; 'series': 0.66; 'burden': 0.68; 'serial': 0.72; '1993': 0.84; 'channel,': 0.84; 'received:fios.verizon.net': 0.84; 'edwards': 0.91; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Referrer key missing form os.environ dictionary? Date: Wed, 25 Sep 2013 21:32:49 -0400 References: <5242f8bc$0$30000$c3e8da3$5496439d@news.astraweb.com> <52437bca$0$30000$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0 In-Reply-To: <52437bca$0$30000$c3e8da3$5496439d@news.astraweb.com> 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: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1380159185 news.xs4all.nl 15895 [2001:888:2000:d::a6]:42649 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:54773 On 9/25/2013 8:11 PM, Steven D'Aprano wrote: > On Wed, 25 Sep 2013 15:18:41 +0000, Grant Edwards wrote: > >>> 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. > > > I stand corrected. > > > That's a pretty shitty design though, isn't it? Communicating via > environment variables. What is this, 1998? :-) 1993 https://en.wikipedia.org/wiki/Common_Gateway_Interface > Mind you, I'm not sure what other alternatives exist. Send a series of lines with the same info over an input channel, as was done 3 years later for FastCGI. Since CGI uses stdout for the finished product, it could have used stdin for the input. Using a serial channel does put more burden on the page server to parse the input. But is allows it to be on a different machine. -- Terry Jan Reedy