git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
trying out the hint from github issue
[plcapi.git]
/
php
/
plc_api.php
diff --git
a/php/plc_api.php
b/php/plc_api.php
index
9a08ad2
..
ea90a8c
100644
(file)
--- a/
php/plc_api.php
+++ b/
php/plc_api.php
@@
-142,7
+142,9
@@
class PLCAPI
// Marshal the XML-RPC request as a POST variable. <nil/> is an
// extension to the XML-RPC spec that is supported in our custom
// version of xmlrpc.so via the 'allow_null' output_encoding key.
// Marshal the XML-RPC request as a POST variable. <nil/> is an
// extension to the XML-RPC spec that is supported in our custom
// version of xmlrpc.so via the 'allow_null' output_encoding key.
- $request = xmlrpc_encode_request($method, $args, array('allow_null' => TRUE));
+ $request = xmlrpc_encode_request($method, $args, array('null_extension'));
+ error_log("ENCODED: " . $method . "(" . $args . ")");
+ error_log("OBTAINED: " . $request);
curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
// Construct the HTTP header
curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
// Construct the HTTP header
@@
-241,10
+243,15
@@
class PLCAPI
}
}
}
}
+// this tentatively allows to tune mainstream xmlrpc php lib
+// so as to achieve the same behaviour as with our patched lib
+$GLOBALS['xmlrpc_null_extension'] = true;
+$GLOBALS['$xmlrpc_null_apache_encoding'] = true;
+
global $adm;
$adm = new PLCAPI(array('AuthMethod' => "capability",
global $adm;
$adm = new PLCAPI(array('AuthMethod' => "capability",
- 'Username' => PLC_API_MAINTENANCE_USER,
+ 'Username'
=> PLC_API_MAINTENANCE_USER,
'AuthString' => PLC_API_MAINTENANCE_PASSWORD));
?>
'AuthString' => PLC_API_MAINTENANCE_PASSWORD));
?>