Subject: | new() handling of proxy URL/rsd file (patch included) |
The new() method accepts either the rsd file URL or the proxy URL. The
module documentation does not explain clearly these two cases.
The code uses regexes to differentiate both cases. RSD case is triggered
with a /\.xml$/ regex. This fails for Serendipity blogging software as
the URL for the RSD file is: .../serendipity_xmlrpc.php?xsd=true
which means that the calling app must either append something like
&whatever=.xml to the URL to trigger the correct case, or later on call
again rsd_url() with the same URL.
The new() method could either be rewritten to better detect RSD files.
It could either in all cases retrieve the document at the URL and parse
it to find if it is really a RSD file.
Or at least the test should be modified to handle serendipity, so
if ( $url =~ m/^http:\/\/.+(?:\.xml|\?xsd=true)$/ ) {
instead of the current
if ( $url =~ m/^http:\/\/.+\.xml$/ ) {