Commit 1faf2852 authored by Jeff Rush's avatar Jeff Rush

A minor patch to cause incoming SOAP requests to have their XML stashed for

later interpretation by a SOAP-aware view.  Without this patch SOAP requests
fall into the XML-RPC logic and cause errors.

This patch does not add significant overhead nor introduce new functionality
other than making it possible to cleanly add-in a 3rd party SOAP parser for
those who want it.  This technique is being used with views using a small
wrapper of soaplib and a @soapmethod decorator, outside the Zope SVN.
parent 848e356e
......@@ -431,8 +431,11 @@ class HTTPRequest(BaseRequest):
meth=None
fs=ZopeFieldStorage(fp=fp,environ=environ,keep_blank_values=1)
if not hasattr(fs,'list') or fs.list is None:
if environ.has_key('HTTP_SOAPACTION'):
# Stash XML request for interpretation by a SOAP-aware view
other['SOAPXML'] = fs.value
# Hm, maybe it's an XML-RPC
if (fs.headers.has_key('content-type') and
elif (fs.headers.has_key('content-type') and
'text/xml' in fs.headers['content-type'] and
method == 'POST'):
# Ye haaa, XML-RPC!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment