Skip to content

Commit

Permalink
MNet goes from ISO8859-1 -> UTF-8; #MDL-8514 MDL-8514
Browse files Browse the repository at this point in the history
  • Loading branch information
donal72 committed Feb 20, 2007
1 parent 624cbc9 commit 1008dad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mnet/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function mnet_get_public_key($uri) {
return $key;
}

$rq = xmlrpc_encode_request('system/keyswap', array($CFG->wwwroot, $MNET->public_key));
$rq = xmlrpc_encode_request('system/keyswap', array($CFG->wwwroot, $MNET->public_key), array("encoding" => "utf-8"));
$ch = curl_init($uri.'/mnet/xmlrpc/server.php');

curl_setopt($ch, CURLOPT_TIMEOUT, 60);
Expand Down
2 changes: 1 addition & 1 deletion mnet/xmlrpc/client.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function send($mnet_peer) {
}

}
$this->requesttext = xmlrpc_encode_request($this->method, $this->params);
$this->requesttext = xmlrpc_encode_request($this->method, $this->params, array("encoding" => "utf-8"));
$rq = $this->requesttext;
$rq = mnet_sign_message($this->requesttext);
$this->signedrequest = $rq;
Expand Down
6 changes: 3 additions & 3 deletions mnet/xmlrpc/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
require_once $CFG->dirroot.'/mnet/remote_client.php';

// Content type for output is not html:
header('Content-type: text/xml');
header('Content-type: text/xml; charset=utf-8');

if (!empty($CFG->mnet_rpcdebug)) {
trigger_error("HTTP_RAW_POST_DATA");
Expand Down Expand Up @@ -414,7 +414,7 @@ function mnet_server_dispatch($payload) {
$method == 'system.keyswap' ||
$method == 'system/keyswap') {

$response = xmlrpc_server_call_method($xmlrpcserver, $payload, $MNET_REMOTE_CLIENT);
$response = xmlrpc_server_call_method($xmlrpcserver, $payload, $MNET_REMOTE_CLIENT, array("encoding" => "utf-8"));
$response = mnet_server_prepare_response($response);
} else {
exit(mnet_server_fault(7018, 'nosuchfunction'));
Expand Down Expand Up @@ -704,7 +704,7 @@ function mnet_server_invoke_method($includefile, $methodname, $method, $payload,
if (RPC_OK == $permission) {
$xmlrpcserver = xmlrpc_server_create();
$bool = xmlrpc_server_register_method($xmlrpcserver, $method, 'mnet_server_dummy_method');
$response = xmlrpc_server_call_method($xmlrpcserver, $payload, $methodname);
$response = xmlrpc_server_call_method($xmlrpcserver, $payload, $methodname, array("encoding" => "utf-8"));
$bool = xmlrpc_server_destroy($xmlrpcserver);
return $response;
}
Expand Down

0 comments on commit 1008dad

Please sign in to comment.