[Zope] cannot access POST content in Zope

Martijn Pieters mj at zopatista.com
Fri Aug 17 03:34:26 EDT 2007

On 8/17/07, Manuel Spuhler <manuel.spuhler at gmail.com> wrote:
> but the content of the POST is empty when I do
> curl http://elevator.sytes.net/RSR/setSMS -H "Content-Type: text/xml"
> -d @post.xml
> I'm working on integrating SMS on Plone, and the external system sends
> me a text/xml header, text/xml is the right type, I think, according
> rfc 3023
> I have been tracking the frames through tcpdump and the request looks
> good before zope.

Zope special-cases POST requests with content-type text/xml; it treats
these as XML-RPC requests. I don't think you can work around this
either. :(

Take a look at HTTPRequest.processInputs in lib/python/HTTPRequest.py,
together with lib/python/xmlrpc.py in your Zope installation, to see
if you find a way around this, or where to patch to disable this.

The easier way would for you to alter the format in which the SMS
gateway contacts the Zope server, though. A properly encoded POST
request (multipart/form-data) would be much preferable and easier to
deal with than patching Zope ;).

Martijn Pieters

More information about the Zope mailing list