toman wrote at 2003-1-14 09:35 -0800:
Is there a way to distinguish whether a request was made from a browser (no, not a particular browser) or from XMLRPC ? I would like to be able to tailor my responses to rpc requests so that I don't get a whole web page sent back when a value would do. Particularly, object creation code usually refers back to the management page of it's container, which isn't the response I want for rpc, success or failure would be preferable. Zope assumes an XMLRPC request iff "REQUEST_METHOD == 'POST' and Content-Type == 'text/xml'".
You can access "REQUEST_METHOD" directly via "REQUEST" and "content-type" via the "REQUEST" method "get_header".
Also, when Zope has a fault on XMLRPC, should it be sending back that big 'Zope Error....' message, according to the XMLRPC spec? I think, Casay changed this for Zope 2.6.
Dieter