[wp-trac] [WordPress Trac] #10658: XMLRPC failure string should convey disabled status for GET requests, too
WordPress Trac
wp-trac at lists.automattic.com
Thu Aug 20 01:43:10 UTC 2009
#10658: XMLRPC failure string should convey disabled status for GET requests, too
-------------------------+--------------------------------------------------
Reporter: redsweater | Owner: josephscott
Type: enhancement | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version:
Severity: normal | Keywords: has-patch
-------------------------+--------------------------------------------------
Currently if you issues a plain GET request (e.g. by trying to load an
xmlrpc.php URL in a browser), you get the error string provided by wp-
includes/class-IXR.php:
XML-RPC server accepts POST requests only.
This is not indicative of any configuration problem when XMLRPC has not
been enabled for the blog. Compare to wp-app.php which, in a comparable
situation, at least indicates the configuration problem:
AtomPub services are disabled on this blog. An admin user can enable them
at http://192.168.1.20/wptrunk/wp-admin/options-writing.php
The attached patch changes xmlrpc.php so that it will provide the same
type of verbose message as wp-app.php does, allowing clients to see
immediately upon trying to access the xmlrpc endpoint URL, that service is
disabled:
XML-RPC services are disabled on this blog. An admin user can enable them
at http://192.168.1.20/wptrunk/wp-admin/options-writing.php
I think this will have a positive impact on providing support e.g. to
users of applications that depend on the API. It's a shortcut when
debugging functionality to type in the xmlrpc URL into the browser to make
sure it's configured correctly, and not spewing any errors.
While I was at it I factored the generation of the string for disabled
XMLRPC into a new method errorStringForDisabledXMLRPC().
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10658>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list