[techtalk] reading cookies in IE5 w/ python

Laurel Fan lf25+ at andrew.cmu.edu
Tue Feb 15 18:23:29 EST 2000


Excerpts from linuxchix: 15-Feb-100 [techtalk] reading cookies .. by
Tricia Bowen at starmedia.n 
> is there anyone out there that knows how to read IE5 cookies using python.
> i tried this approach but IE5 does not appear to have an environment
> variable called HTTP_COOKIE.

I don't know the answer to your question, but when I was doing cgi, I
wrote a simple C program to dump out all of the env variables
(appended).  It might help to compile it and run it as a cgi on your own
server (I do have it running at
http://enchant.res.cmu.edu/cgi-bin/getenv, but it'll be different for
you if you're not using the same web server as I am).  It shouldn't be
difficult to write something similar in python, either.

----- dumpenv.c -----
#include <stdio.h>

int main(int argc, char *argv[], char *envp[])
{
  char *s;
  int i=0;
  fprintf(stdout, "Content-type: text/html\n\n");
  while(envp[i]){
    fprintf(stdout, "%s<BR>\n", envp[i]);
    i++;
  }
}
----- dumpenv.c ----- 

************
techtalk at linuxchix.org   http://www.linuxchix.org




More information about the Techtalk mailing list