diff options
Diffstat (limited to 'inc/IXR_Library.php')
-rw-r--r-- | inc/IXR_Library.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php index c8255e6d9..979dc4d16 100644 --- a/inc/IXR_Library.php +++ b/inc/IXR_Library.php @@ -302,11 +302,12 @@ class IXR_Server { } function serve($data = false) { if (!$data) { - global $HTTP_RAW_POST_DATA; - if (!$HTTP_RAW_POST_DATA) { + + $postData = trim(http_get_raw_post_data()); + if (!$postData) { die('XML-RPC server accepts POST requests only.'); } - $data = $HTTP_RAW_POST_DATA; + $data = $postData; } $this->message = new IXR_Message($data); if (!$this->message->parse()) { @@ -439,7 +440,7 @@ EOD; $method = $call['methodName']; $params = $call['params']; if ($method == 'system.multicall') { - $result = new IXR_Error(-32600, 'Recursive calls to system.multicall are forbidden'); + $result = new IXR_Error(-32800, 'Recursive calls to system.multicall are forbidden'); } else { $result = $this->call($method, $params); } @@ -501,7 +502,7 @@ class IXR_Client extends DokuHTTPClient { var $xmlerror = false; function IXR_Client($server, $path = false, $port = 80) { - $this->DokuHTTPClient(); + parent::__construct(); if (!$path) { // Assume we have been given a URL instead $this->posturl = $server; |