Returning HTTP POST body from CGI module
ws-news at gmx.at
Sat Nov 24 23:38:08 CET 2001
"Stephen" <shriek at gmx.co.uk> wrote in message
news:97ae44ee.0111241108.f40c23a at posting.google.com...
> If I understand correctly, the body of a HTTP POST should be
> URL-encoded, right ?
AFAIK, this is only the default, you can also send other data formats in the
body, as long as the Content-Type has been specified in the header.
(e. g. you can specifiy the encoding in the HTML FORM tag)
> Since they are sending XML data in the
> HTTP body, and it is not URL-encoded, it's not really
> compatible with the CGI module which will be looking for
> variable/value pairs. Is it possible to access the raw
> HTTP header and body from the CGI module instead ?
> Or will I really have to write a socket handler to deal with
> this ?
If it is just a matter of a missing header, you can probably derive your own
class and tweak it or probably copy/modify the original code.
More information about the Python-list