XML-RPC for PHP version 4.4.2 - 2020/3/4
-* fixed: `client->setCookie()` bug: values that contain spaces are now properly encoded in a way that get decoded back
- to spaces on the receiving end if that one is running on php 7.4 (or does RFC-compliant cookie decoding)
+* fixed: `client->setCookie()` bug: cookie values that contain spaces are now properly encoded in a way that gets them
+ decoded back to spaces on the receiving end if the server running on php 7.4 (or does RFC-compliant cookie decoding).
+ Beforehand we were encoding spaces to '+' characters.
XML-RPC for PHP version 4.4.1 - 2019/7/29
}
}
+// NB: take care not to output anything else after this call, as it will mess up the responses and it will be hard to
+// debug. In case you have to do so, at least re-emit a correct Content-Length http header (requires output buffering)
+
$srv = new PhpXmlRpc\Server(array(
"discuss.addComment" => array(
"function" => "addComment",
}
// run the server
+// NB: take care not to output anything else after this call, as it will mess up the responses and it will be hard to
+// debug. In case you have to do so, at least re-emit a correct Content-Length http header (requires output buffering)
$server = new PhpXmlRpc\Server(
array(
'xmlrpcproxy.call' => array(
}
}
- // do not output content-length header if php is compressing output for us:
- // it will mess up measurements
+ // Do not output content-length header if php is compressing output for us:
+ // it will mess up measurements.
+ // Note that Apache/mod_php will add (and even alter!) the Content-Length header on its own, but only for
+ // responses up to 8000 bytes
if ($phpNoSelfCompress) {
header('Content-Length: ' . (int)strlen($payload));
}