Opened 13 years ago
Closed 13 years ago
#20705 closed defect (bug) (duplicate)
IXR_Server::output method doesn't honor blog_charset option
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.3.2 |
Component: | XML-RPC | Keywords: | |
Focuses: | Cc: |
Description
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.
Change History (5)
Note: See
TracTickets for help on using
tickets.
Please note that on the other hand the little piece of xml that xmlrpc.php outputs when called with the rsd query string param, does just that, even if it's not really needed because the content is pure ASCII in that case.