From: K. G. <kim...@gm...> - 2008-09-09 07:40:33
|
Hi guys, On Mon, Sep 8, 2008 at 22:12, Kim Gräsman <kim...@gm...> wrote: > > On Mon, Sep 8, 2008 at 14:58, Divye Kapoor <div...@gm...> wrote: >>> >>> Tab/space separated values work -- they can easily be parsed through >>> std::ostringstream's -- as well as doing a '\n' delimited lines for >>> pseudo-CSV. >> >> Ok. > > I'm currently playing with a HTTP header-style format to echo headers > for the post tests. > > I have a new post_echo_headers.py, that emits the request headers on > the canonical "name: value\n" form. It gets harder if you want to > combine headers and other data on the same page, though... I've looked into this more closely, and it appears that only selected headers make it through to the CGI scripts. So, as far as I can see there's no reliable way to dump all request headers to the response from a CGI script, via the Python server. The ones that make it through are listed in the run_cgi method in Python's CGIHTTPServer.py. Content-Length and Content-Type are among them, so I thought I had it working for a while :-/ Grr. - Kim |