* improved: the testsuite has basic checks for the debugger and demo files
-* fixed: the debugger would fail sending a request with ISO-8859-1 payload (it missed the character set declaration).
- It would have a hard time coping with ISO-8859-1 in other fields, such as e.g. the remote method name
-
* fixed: the server would fail to decode a request with ISO-8859-1 payload and character set declaration in the xml prolog only
* fixed: the client would fail to decode a response with ISO-8859-1 payload and character set declaration in the xml prolog only
* fixed: the client can now successfully call methods using ISO-8859-1 or UTF-8 characters in their name
+* fixed: the debugger would fail sending a request with ISO-8859-1 payload (it missed the character set declaration).
+ It would have a hard time coping with ISO-8859-1 in other fields, such as e.g. the remote method name
+
+* improved: the debugger is displayed using UTF-8, making it more useful to debug any kind of service
+
* improved: echo all debug messages even when there are characters in them which php deems to be in a wrong encoding
(this is visible e.g. in the debugger)
* @todo use ob_start to catch debug info and echo it AFTER method call results?
* @todo be smarter in creating client stub for proxy/auth cases: only set appropriate property of client obj
**/
+
+header('Content-Type: text/html; charset=utf-8');
+
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<h3>Changelog</h3>
<ul>
+ <li>2015-04-19: fix problems with LATIN-1 characters in payload</li>
<li>2007-02-20: add visual editor for method payload; allow strings, bools as jsonrpc msg id</li>
<li>2006-06-26: support building php code stub for calling remote methods</li>
<li>2006-05-25: better support for long running queries; check for no-curl installs</li>
$inputcharset = mb_detect_encoding(urldecode($_SERVER['REQUEST_URI']), $preferredEncodings);
if (isset($_GET['usepost']) && $_GET['usepost'] === 'true') {
$_GET = $_POST;
- /// @bug this is not a perfect detection method - it will fail if eg. a latin1 character is in the method name
- $inputcharset = mb_detect_encoding(urldecode(isset($_GET['methodpayload'])) ? $_GET['methodpayload'] : '', $preferredEncodings);
+ $inputcharset = mb_detect_encoding(implode('', $_GET), $preferredEncodings);
}
+/// @todo if $inputcharset is not UTF8, we should probably re-encode $_GET to make it UTF-8
+
// recover input parameters
$debug = false;
$protocol = 0;
**/
// make sure we set the correct charset type for output, so that we can display all characters
-//header('Content-Type: text/html; charset=utf-8');
+header('Content-Type: text/html; charset=utf-8');
include __DIR__ . '/common.php';
if ($action == '') {