summaryrefslogtreecommitdiff
path: root/inc/IXR_Library.php
diff options
context:
space:
mode:
authorGuy Brand <gb@unistra.fr>2012-09-10 17:04:45 +0200
committerGuy Brand <gb@unistra.fr>2012-09-10 17:04:45 +0200
commit0f8ac4e8c5872a6b68b350f96a9ecde0291edefa (patch)
treead7938bb4143d5e5a38fd7a8d131e4171aec657d /inc/IXR_Library.php
parent58ec8fa9128e4581749955de87530f432e387588 (diff)
parentb31fcef02fd24b3e746c9618e77152c7b84c2f2a (diff)
downloadrpg-0f8ac4e8c5872a6b68b350f96a9ecde0291edefa.tar.gz
rpg-0f8ac4e8c5872a6b68b350f96a9ecde0291edefa.tar.bz2
Merge branch 'master' into stable
Diffstat (limited to 'inc/IXR_Library.php')
-rw-r--r--inc/IXR_Library.php11
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;