From: K. G. <kim...@gm...> - 2008-09-10 07:50:13
|
Hi Allister, On Wed, Sep 10, 2008 at 09:07, Allister Levi Sanchez <all...@gm...> wrote: > > If we look deep at the code (see $PYTHON_HOME/Lib/rfc822.py), self.headers > is simply a list. One can simply concatenate the elements of a list (with a > really unique separator) and add it into os.environ. Something like this in > http_test_server.py: > all_headers = ',--aUniqueSeparator--,'.join(self.headers) > os.environ['HTTP_ALL_HEADERS'] = all_headers > and in the CGI script, we can easily recover it: > list_of_all_headers = > os.environ.get('HTTP_ALL_HEADERS','').split(',--aUniqueSeparator--,') > There you have it. I'll commit it after work -- or you could commit it > yourself ;-) Sweet! - Kim |