A common mechanism for XML-RPC clients to find out information about your WordPress blog is to look for the Really Simple Discovery (RSD) URL. The RSD contains information about the available APIs that WordPress supports. A typical discovery process would look something like this:
- Request your blog URL, http://example.com/ and look for the RSD link element
- Request the RSD URL and parse the provided info
- Determine which API information to use
- Communicate with your blog via the determined API
On rare occasions I’ve seen reports where the RSD URL (which looks like http://example.com/xmlrpc.php?rsd in WordPress) will take a very long time to load (3 minutes or more) even though the rest of the site responds very quickly. This can cause problems for XML-RPC clients (like the WordPress iPhone app) if they timeout trying to get the RSD data. The reports of this problem were few and far between, without much of a common thread. Until today.
Ticket 9380 showed up earlier today, reported by foks. Foks noticed that the SSL check being done when the RSD URL was requested didn’t have a timeout set, so if the conditions were just right it will wait for the system level timeout before failing. That explained why the RSD request would take so long in some cases. If you’ve run into this problem you can use the trivial one line patch or grab a copy of the wp-includes/functions.php file from the WordPress 2.7.x branch at http://core.trac.wordpress.org/browser/branches/2.7/wp-includes/functions.php?rev=10831&format=txt and try it out.
This fix has been applied to both the 2.7.x branch (meaning it will be part of a 2.7.2 release if there is one) and -trunk (meaning it will be part of the upcoming 2.8 release).