Hard-coded "Content-type:text/xml" as xmlrpc in Zope (2.8.1)
Back in June 2004, I had the following problem: http://mail.zope.org/pipermail/zope/2004-June/151436.html http://mail.zope.org/pipermail/zope/2004-June/151492.html http://mail.zope.org/pipermail/zope/2004-June/151497.html http://mail.zope.org/pipermail/zope/2004-June/151498.html which came about because HTTPRequest.py was hard-coded to assume that any request with a Content-type of "text/xml" is an xmplrpc call and handles the request as such. I resolved this issue with the help of brian@zope.org, who gave me the XmlFix product, which monkey-patches the HTTPRequest.processInputs method to respond a bit more appropriately. We noted in the thread that although Zope's behavior is broken, it is unlikely to change for historical reasons. I am fine with this and felt comfortable with the simplicity and supportability of the monkey-patch. This monkey-patch was no longer effective recently when I upgraded our Zope instances to 2.8.1. Zope-2.8.1 now additionally has the zope.app.publication. HTTPPublicationRequestFactory class, which also assumes that "text/xml" means xmlrpc (in fact, it assumes that anything that startswith('text/xml') is an xmlrpc call). Not fixing old code which acts in strange hard-coded ways is something I understand, but adding new code that also acts that way seems like it is getting further away from "good" :) Can anything be done to change the behavior in the HTTPPublicationRequestFactory so that it is not so obtuse? My monkey-patch now has to munge two methods to make xml uploads work and I am less happy with it than I was before. Thanks for your time, John Ziniti
John Ziniti wrote at 2005-11-21 15:04 -0500:
... Zope-2.8.1 now additionally has the zope.app.publication. HTTPPublicationRequestFactory class, which also assumes that "text/xml" means xmlrpc (in fact, it assumes that anything that startswith('text/xml') is an xmlrpc call).
"zope.app" is part of Zope 3. You should complain about this misfeature on "zope3-dev@zope.org". Definitely, there should not be a fixed (not configurable) association between "text/xml" requests and "XML-RPC" as "text/xml" can be interesting for the application and for SOAP.
Not fixing old code which acts in strange hard-coded ways is something I understand, but adding new code that also acts that way seems like it is getting further away from "good" :)
-- Dieter
--On 22. November 2005 20:37:16 +0100 Dieter Maurer <dieter@handshake.de> wrote:
You should complain about this misfeature on "zope3-dev@zope.org". Definitely, there should not be a fixed (not configurable) association between "text/xml" requests and "XML-RPC" as "text/xml" can be interesting for the application and for SOAP.
For Zope 3.2 publishers are pluggable and can be configure through ZCML. The registration is based on the request method and mime-type. -aj
participants (3)
-
Andreas Jung -
Dieter Maurer -
John Ziniti