John Ziniti wrote:
ZPublisher seems to assume that if the Content-type on an HTTP POST is "text/xml", then the request contains an xmlrpc call.
I would like to POST an XML document and handle it myself
1. I would prefer not to hack Zope.
The more I look at this problem and the Zope code set up to handle it, the more I think that hacking Zope is the only way to accomplish what I want. The question I keep coming to, though, is "Is it right that Zope assumes that all POSTs with a text/xml payload are xmlrpc calls?" and I can't help but answering "no".
And you are correct ;) Unfortunately, though, this misfeature has been around for a long time and would break a lot of people if the default were changed. That doesn't mean it shouldn't necessarily be changed anyway, possibly with some sort of backward-compatibility mode that would make the transition reasonable. Short of that though, its your lucky day, since I happen to have an add-on product laying around that does exactly what you want ;) The attached XmlFix product disables xml-rpc handling w/o having to hack Zope (well, it hacks it from the outside, at least), which lets you handle xml sent via POST. This is based on a SoapFix product that does much the same thing, except that it is more discriminating and only lets SOAP requests bypass the xml-rpc handling (which otherwise works normally). I've attached that as well, in case it is useful to anybody. Hope this helps! Brian Lloyd brian@zope.com V.P. Engineering 540.361.1716 Zope Corporation http://www.zope.com