[wp-trac] [WordPress Trac] #20705: IXR_Server::output method doesn't honor blog_charset option
WordPress Trac
wp-trac at lists.automattic.com
Fri May 18 20:21:26 UTC 2012
#20705: IXR_Server::output method doesn't honor blog_charset option
--------------------------+-----------------------------
Reporter: aercolino | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.3.2
Severity: normal | Keywords:
--------------------------+-----------------------------
I've been writing an enhancement for my LoginDongle plugin, where I will
use a query string param to allow an XML-RPC user to log in.
To do that, I had to subclass the wp_xmlrpc_server class with a method
like the following and add a filter for wp_xmlrpc_server_class.
{{{
public function output($xml)
{
$format = get_option('blog_charset');
$xml = '<?xml version="1.0" encoding="' . $format . '"?>'."\n".$xml;
$length = strlen($xml);
header('Connection: close');
header('Content-Length: '.$length);
header('Content-Type: text/xml; charset=' . $format);
header('Date: '.date('r'));
echo $xml;
exit;
}
}}}
It would be nice to have that implemented in WP.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20705>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list