From ebe66340ec9b16af4e125dbe99d39ff748ac19ea Mon Sep 17 00:00:00 2001 From: gggeek Date: Tue, 3 Jan 2023 11:34:54 +0000 Subject: [PATCH] docs --- doc/manual/phpxmlrpc_manual.adoc | 13 ++++++++----- src/Server.php | 5 +++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/doc/manual/phpxmlrpc_manual.adoc b/doc/manual/phpxmlrpc_manual.adoc index 038295c9..3d33e782 100644 --- a/doc/manual/phpxmlrpc_manual.adoc +++ b/doc/manual/phpxmlrpc_manual.adoc @@ -363,7 +363,8 @@ use PhpXmlRpc\Client; $client = new Client("/RPC2", "betty.userland.com", 80); ---- -The `$server_port` parameter is optional, and if omitted will default to '80' when using HTTP and '443' when using HTTPS or HTTP2. +The `$server_port` parameter is optional, and if omitted will default to '80' when using HTTP and '443' when using HTTPS +or HTTP2. The `$transport` parameter is optional, and if omitted will default to 'http'. Allowed values are either 'http', 'https', 'http11', 'http10', 'h2' or 'h2c'. Its value can be overridden with every call to the `send()` method. See the @@ -777,7 +778,7 @@ into the response. ===== $allow_system_funcs -Default_value: `TRUE`. When set to `FALSE`, disables support for `System.xxx` functions in the server. It might be useful +Default value: `TRUE`. When set to `FALSE`, disables support for `System.xxx` functions in the server. It might be useful e.g. if you do not wish the server to respond to requests to `System.ListMethods`. ===== $compress_response @@ -802,9 +803,9 @@ Charset encoding to be used for responses (only affects string values). If it can, the server will convert the generated response from internal_encoding to the intended one. Valid values are: a supported xml encoding (only `UTF-8` and `ISO-8859-1` at present, unless mbstring is enabled), `null` -(leave charset unspecified in response and convert output stream to US_ASCII), `default` (use xmlrpc library default as -specified in @TODO..., convert output stream if needed), or `auto` (use client-specified charset encoding or same as -request if request headers do not specify it (unless request is US-ASCII: then use library default anyway). +(leave charset unspecified in response and convert output stream to US_ASCII), or `auto` (use client-specified charset +encoding or same as request if request headers do not specify it (unless request is US-ASCII: then use library default +anyway). ==== Troubleshooting server's method handlers @@ -1297,6 +1298,8 @@ php values to Value objects. * if the server you are communicating with does support it, and the requests you are sending are big, or the network slow, you should enable compression of the requests, via setting `+$client->request_compression = true+` +* set `+$server->debug = 0+` + * boxcar multiple xml-rpc calls into a single http request by making usage of the `system.multicall` capability. Just passing in an array of Request objects to `+$client->send()+` is usually enough. If the server you are talking to does not support `system.multicall`, see the __demo/client/parallel.php__ example instead for how to send multiple requests diff --git a/src/Server.php b/src/Server.php index 7bfabcdf..9c434895 100644 --- a/src/Server.php +++ b/src/Server.php @@ -57,7 +57,9 @@ class Server */ public $accepted_compression = array(); - /// Shall we serve calls to system.* methods? + /** + * Shall we serve calls to system.* methods? + */ public $allow_system_funcs = true; /** @@ -72,7 +74,6 @@ class Server * NB: if we can, we will convert the generated response from internal_encoding to the intended one. * Can be: a supported xml encoding (only UTF-8 and ISO-8859-1 at present, unless mbstring is enabled), * null (leave unspecified in response, convert output stream to US_ASCII), - * 'default' (use xmlrpc library default as specified in xmlrpc.inc, convert output stream if needed), * or 'auto' (use client-specified charset encoding or same as request if request headers do not specify it (unless request is US-ASCII: then use library default anyway). * NB: pretty dangerous if you accept every charset and do not have mbstring enabled) */ -- 2.47.0