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

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to