Returning HTTP POST body from CGI module

Stephen shriek at
Sat Nov 24 20:08:48 CET 2001

I have a Python CGI script receiving XML data via HTTP POST from 
another company.  Unfortunately, that company doesn't seem to
have implemented the HTTP protocol correctly.

ie. they are currently sending HTTP POST requests of the 
    following format : 





If I understand correctly, the body of a HTTP POST should be 
URL-encoded, right ?  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 ?


More information about the Python-list mailing list