How to install dm.zopepatches.xmlrpc
- Download and install ActivePython
- Open Command Prompt
pypm install dm.zopepatches.xmlrpc
This package patches the web application server Zope to allow customizable control over the interpretation of requests as xmlrpc requests. It implements functionality proposed in https://bugs.launchpad.net/zope2/+bug/373663.
The package has been tested with Zope 2.10.x. It contains special handling for Zope 2.11 and Zope 2.12. Because each of these versions requires version specific handling (an indication that the corresponding Zope code is unstable (in the sense that it changes often)), it is likely to fail with other Zope versions.
Control xmlrpc processing
Zope has built in xmlrpc support. Unfortunately, this support triggers as soon as a "POST" request has a "text/xml" content type. However, there are many "POST" requests which use a "text/xml" content type but cannot be interpreted as xmlrpc requests, most prominently SOAP 1.1 requests.
Starting with Zope 2.12, Zope no longer treats requests with a "SoapAction" header as xmlrpc requests. This solves the problem for SOAP 1.1 requests; however, in a very ad-hoc way. This package provides an easily customizable way to control the recognition of xmlrpc requests.
In publisher.interfaces it defines the interface IXmlrpcChecker. This interface is destined as an interface implemented by a utility. When dm.zopepatches.publisher.interfaces is imported, Zope's HTTPRequest is patched such that when the preconditions for an xmlrpc request as stipulated by the xmlrpc specification ("POST" request and content type text/xml) are met, an IXmlrpcChecker utility is looked up and the request is interpreted as an xmlrpc request when either no such utility is found or the utility applied to the request returns true. Otherwise, the request is treated normally and other parts of the framework or the application can handle it as appropriate.
This means that you simply can register an dm.zopepatches.xmlrpc.publisher.interfaces.IXmlrpcChecker utility when you need control over the triggering of Zope's xmlrpc support.