From 96946cc94d3ecb3832e2a1ce35c49743e25329e1 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Wed, 21 Mar 2012 11:25:00 +0100 Subject: replaced $HTTP_RAW_POST_DATA with http_get_raw_post_data function --- inc/IXR_Library.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'inc/IXR_Library.php') diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php index c8255e6d9..ce5a4d914 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()) { -- cgit v1.2.3 From 7518cd81d69733d64ee5c80a8e5df4fcaa33246d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 23 Mar 2012 08:16:38 +0100 Subject: use correct call to parent constructor in IXR lib --- inc/IXR_Library.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/IXR_Library.php') diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php index c8255e6d9..80b534b2e 100644 --- a/inc/IXR_Library.php +++ b/inc/IXR_Library.php @@ -501,7 +501,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; -- cgit v1.2.3 From 586bfa91f239ca0bd7d90be35d5d81fb4edaa5d1 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Wed, 4 Apr 2012 21:49:26 +0200 Subject: Changed an error code in XML-RPC interface. This error hasn't anything to do with the rest of the -32600 errors. --- inc/IXR_Library.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/IXR_Library.php') diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php index d1e877813..979dc4d16 100644 --- a/inc/IXR_Library.php +++ b/inc/IXR_Library.php @@ -440,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); } -- cgit v1.2.3