forked from extern/egroupware
automaticaly convert to and from the xml-charset utf-8
This commit is contained in:
parent
81bbfbc39f
commit
5153b0d8e3
@ -80,7 +80,7 @@
|
|||||||
global $HTTP_RAW_POST_DATA;
|
global $HTTP_RAW_POST_DATA;
|
||||||
|
|
||||||
$r = $this->parseRequest();
|
$r = $this->parseRequest();
|
||||||
if (!$r)
|
if ($r == False)
|
||||||
{
|
{
|
||||||
header('WWW-Authenticate: Basic realm="eGroupWare xmlrpc"');
|
header('WWW-Authenticate: Basic realm="eGroupWare xmlrpc"');
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
@ -91,7 +91,7 @@
|
|||||||
{
|
{
|
||||||
$payload = "<?xml version=\"1.0\"?>\n" . $this->serializeDebug() . $r->serialize();
|
$payload = "<?xml version=\"1.0\"?>\n" . $this->serializeDebug() . $r->serialize();
|
||||||
Header("Content-type: text/xml\r\nContent-length: " . strlen($payload));
|
Header("Content-type: text/xml\r\nContent-length: " . strlen($payload));
|
||||||
print $payload;
|
echo $GLOBALS['phpgw']->translation->convert($payload,$GLOBALS['phpgw']->translation->charset(),'utf-8');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->log)
|
if ($this->log)
|
||||||
@ -245,17 +245,19 @@
|
|||||||
function parseRequest($data='')
|
function parseRequest($data='')
|
||||||
{
|
{
|
||||||
global $HTTP_RAW_POST_DATA;
|
global $HTTP_RAW_POST_DATA;
|
||||||
|
|
||||||
|
$r = False;
|
||||||
|
|
||||||
if ($data == '')
|
if ($data == '')
|
||||||
{
|
{
|
||||||
$data = $HTTP_RAW_POST_DATA;
|
$data = $HTTP_RAW_POST_DATA;
|
||||||
}
|
}
|
||||||
$parser = xml_parser_create($GLOBALS['xmlrpc_defencoding']);
|
$parser = xml_parser_create($GLOBALS['xmlrpc_defencoding']);
|
||||||
|
|
||||||
$GLOBALS['_xh'][$parser] = array();
|
$GLOBALS['_xh'][$parser] = array();
|
||||||
$GLOBALS['_xh'][$parser]['st'] = '';
|
$GLOBALS['_xh'][$parser]['st'] = '';
|
||||||
$GLOBALS['_xh'][$parser]['cm'] = 0;
|
$GLOBALS['_xh'][$parser]['cm'] = 0;
|
||||||
$GLOBALS['_xh'][$parser]['isf'] = 0;
|
$GLOBALS['_xh'][$parser]['isf'] = 0;
|
||||||
$GLOBALS['_xh'][$parser]['params'] = array();
|
$GLOBALS['_xh'][$parser]['params'] = array();
|
||||||
$GLOBALS['_xh'][$parser]['method'] = '';
|
$GLOBALS['_xh'][$parser]['method'] = '';
|
||||||
|
|
||||||
@ -395,6 +397,8 @@
|
|||||||
|
|
||||||
// _debug_array($params);
|
// _debug_array($params);
|
||||||
$this->reqtoarray($params);
|
$this->reqtoarray($params);
|
||||||
|
// decode from utf-8 to our charset
|
||||||
|
$this->req_array = $GLOBALS['phpgw']->translation->convert($this->req_array,'utf-8');
|
||||||
//_debug_array($this->req_array);
|
//_debug_array($this->req_array);
|
||||||
if (ereg('^service',$method))
|
if (ereg('^service',$method))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user