I'm trying to send an XML straight into Zope without specifying it as
a parameter and with a Content-Length. It seems that Zope's mapply
function or whatever it's called digests the raw http body and tries
to turn it into parameters?
Here's the code on the Zope server (uploadExpenseXML()):
Here's the dummy code that sends the XML into my Zope:
xml_content = open('validxmlfile.xml').read()
http = httplib.HTTP("localhost", 8080)
http.putheader("Content-Length", "%d" % len(xml_content))
reply, message, headers = http.getreply()
The result I get is:
If I debug the value of that single REQUEST.form variable, it starts like this:
'"1.0" encoding="ISO-8859-1" standalone="yes" ?>\n<XMLExpense Version="1.0">
Obviously, one solution would be to ask the XML sending company to not
post it like this but instead post it by parameter which I know will
But, what if I can't change their minds?
PS. When faced with the same problem a long time ago I ended up
writing a mod_python app running one a different port that converted
the http post from mod_python into a parameter based http post. I
don't want to have to do that again.
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -