Request Headers In a CGI
fuzzyman at gmail.com
Mon Sep 13 09:04:56 CEST 2004
Sam Holden <sholden at flexal.cs.usyd.edu.au> wrote in message news:<slrnck2sab.9d5.sholden at flexal.cs.usyd.edu.au>...
> On 10 Sep 2004 02:02:23 -0700, Michael Foord <fuzzyman at gmail.com> wrote:
> > Is it possible to get at the http request headers in a normal CGI ?
> > I can't touch the server, so I can't install anything like mod_python.
> > I've tried googling but the answer seems to be 'no'.
> > I know I can reconstruct *most* headers from the environment variables
> > - is this my only option ? I've heard of 'non-parsed headers', but I
> > don't know how to use them from within a python cgi....
> Non-parsed headers are unrelated - they involve the web server not
> parsing the CGI response headers but instead sending them directly to
> the browser.
> What you want can't be done. You can reconstruct most of what you want
> via the environment, but not all of it. HTTP Authentication passwords
> leap to mind.
Which means it's impossible to implement basic authentication in
CGI... it has to be done on the server..... (which I can't do)...
More information about the Python-list