[ZCM] [ZC] 1175/ 2 Comment "404 errors caused by xml-rpc calls are masked"

"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Mon, 17 Sep 2007 00:17:24 -0400
Newsgroups gmane.comp.web.zope.devel.collector-monitor
Message-ID <[email protected]>
Issue #1175 Update (Comment) "404 errors caused by xml-rpc calls are masked"
 Status Pending, Zope/bug+solution medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1175

==============================================================
= Comment - Entry #2 by betabug on Sep 17, 2007 12:17 am

The patch is missing the following line:

from zExceptions import NotFound

Also note that apparently the xmlrpc specs tell us **not** to return a 404. The problems is that some spammers who try to abuse xmlrpc won't get it when we don't return a 404, so for the moment I've applied the patch to my own server.
________________________________________
= Request - Entry #1 by netchan on Jan 11, 2004 7:43 pm


Uploaded:  "Zope_lib_python_ZPublisher_xmlrpc_py.diff"
 - http://www.zope.org/Collectors/Zope/1175/Zope_lib_python_ZPublisher_xmlrpc_py.diff/view
When trying to access a nonexistent object/method, lib/python/ZPublisher/xmlrpc.py sets the status code 200 and sends back a regular xml-rpc Fault, with the standard 'Cannot locate object' message in html format as the body of the Fault.
The attached patch solves the problem if the variable 't' in method 'exception' is a zException.NotFound. Additional check for t=='NotFound' might be necessarry.
==============================================================