From: K. G. <kim...@gm...> - 2008-09-12 16:50:05
|
Hi people, On Thu, Sep 11, 2008 at 10:07, Allister Levi Sanchez <all...@gm...> wrote: > >> I'm thinking that it should be simple to build a little header >> dictionary that can parse the HTTP_ALL_HEADERS string, and use it from >> all CGI scripts. That way, the headers are available similarly to >> cgi.FieldStorage().headers, but in raw form. > > Hmmm, I think you're on to something interesting here... Maybe that's > better or more efficient or more elegant than having so many environment > variables... Looking forward to what you can cook up then :-) I've committed rev 93 to http_integration, which uses this technique to transport all headers from server to cgi script. I added cgisupport.http_headers, which wraps this relative weirdness and exposes the headers as a bona-fide dictionary. Seems to be working... > As you may know, a module is simply a *.py file. To make it importable, > simply put it in the same folder as the importing code or add the path to > its containing folder to $PYTHONPATH. Thanks! Currently cgisupport is only used from the cgi-bin dir, so I placed it there. I think that's good enough, Let me know if there are problems on non-Windows platforms. Cheers, - Kim |