diff options
author | Ermal <eri@pfsense.org> | 2013-12-20 22:08:34 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-12-20 22:08:34 +0000 |
commit | aa205c3b69bf76b1565fd42dba83c7637212f793 (patch) | |
tree | f04ba2d5e093bd36f0e128690e72ae538b8104de /etc/inc/xmlrpc_server.inc | |
parent | cc2630208cc31ac3a19c185036a4b589d125e99a (diff) | |
download | pfsense-aa205c3b69bf76b1565fd42dba83c7637212f793.zip pfsense-aa205c3b69bf76b1565fd42dba83c7637212f793.tar.gz |
Rmoeve register_long_arrays from php.ini and from php code the use of HTTP_*_VARS as its deprecated and luckily low use in pfSense to win memory and compativility
Diffstat (limited to 'etc/inc/xmlrpc_server.inc')
-rw-r--r-- | etc/inc/xmlrpc_server.inc | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/etc/inc/xmlrpc_server.inc b/etc/inc/xmlrpc_server.inc index 10b8beb..f4d8a46 100644 --- a/etc/inc/xmlrpc_server.inc +++ b/etc/inc/xmlrpc_server.inc @@ -304,6 +304,12 @@ class XML_RPC_Server /** + * The HTTP request data + * @null + */ + var $client_data = ''; + + /** * Constructor for the XML_RPC_Server class * * @param array $dispMap the dispatch map. An associative array @@ -328,7 +334,6 @@ class XML_RPC_Server */ function XML_RPC_Server($dispMap, $serviceNow = 1, $debug = 0) { - global $HTTP_RAW_POST_DATA; if ($debug) { $this->debug = 1; @@ -351,11 +356,11 @@ class XML_RPC_Server */ function serializeDebug() { - global $XML_RPC_Server_debuginfo, $HTTP_RAW_POST_DATA; + global $XML_RPC_Server_debuginfo; if ($this->debug) { XML_RPC_Server_debugmsg('vvv POST DATA RECEIVED BY SERVER vvv' . "\n" - . $HTTP_RAW_POST_DATA + . $this->server_payload . $this->client_data . "\n" . '^^^ END POST DATA ^^^'); } @@ -446,7 +451,9 @@ class XML_RPC_Server */ function createServerPayload() { - $r = $this->parseRequest(); + $this->client_data = file_get_contents("php://input"); + + $r = $this->parseRequest($this->client_data); $this->server_payload = '<?xml version="1.0" encoding="' . $this->encoding . '"?>' . "\n" . $this->serializeDebug() @@ -537,12 +544,13 @@ class XML_RPC_Server */ function parseRequest($data = '') { - global $XML_RPC_xh, $HTTP_RAW_POST_DATA, + global $XML_RPC_xh, $XML_RPC_err, $XML_RPC_str, $XML_RPC_errxml, $XML_RPC_defencoding, $XML_RPC_Server_dmap; if ($data == '') { - $data = $HTTP_RAW_POST_DATA; + $data = file_get_contents("php://input"); + $this->client_data = $data; } $this->encoding = XML_RPC_Message::getEncoding($data); @@ -653,10 +661,8 @@ class XML_RPC_Server */ function echoInput() { - global $HTTP_RAW_POST_DATA; - $r = new XML_RPC_Response(0); - $r->xv = new XML_RPC_Value("'Aha said I: '" . $HTTP_RAW_POST_DATA, 'string'); + $r->xv = new XML_RPC_Value("'Aha said I: '" . $this->client_data, 'string'); print $r->serialize(); } } |