Getting all client http headers

Gilles Lenfant glenfant.nospam at bigfoot.com
Tue Jun 19 07:34:07 EDT 2001


Just have a look to the test() function of the cgi.py and all will be
clear...
In addition, just create the script below in any cgi directory and run it
through a browser. After this, all should be clear in your mind.

import cgi
cgi.test()

Note you cant provide arguments to this script through GET or POST forms and
see your form data.

"Joonas Paalasmaa" <joonas.paalasmaa at nokia.com> a écrit dans le message
news: 3B2F1C80.DF4CEB85 at nokia.com...
> Michael Ströder wrote:
> >
> > Joonas Paalasmaa wrote:
> > >
> > > How can I get all client http headers in python.
> > > Can I use cgi-module?
> >
> > Assuming that you implement a simple CGI-BIN program you have to
> > stick to the CGI-BIN environment vars which contain some of the HTTP
> > header information (usually prefix HTTP_).
>
> Do you mean os.environ?
> Does it contain ALL headers?





More information about the Python-list mailing list