Update webpagetool.php

This commit is contained in:
Namhyeon Go 2020-02-07 15:24:12 +09:00 committed by GitHub
parent e014326bc1
commit 7e836f5615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -393,17 +393,14 @@ if(!check_function_exists("get_web_page")) {
$data = $data['data'];
}
// redefine data (JSON-RPC 1.1)
if(in_array("jsonrpc", $req_methods)) {
// redefine data (JSON-RPC 1.1 / JSON-RPC 2.0)
if(in_array("jsonrpc", $req_methods) && in_array("compatible", $req_methods)) {
$req_methods[] = "jsondata";
$headers['Content-Type'] = "application/json-rpc";
$data = array_merge(array(
"jsonrpc" => "1.1"
), $data);
}
// redefine data (JSON-RPC 2.0)
if(in_array("jsonrpc2", $req_methods)) {
} elseif(in_array("jsonrpc", $req_methods) || in_array("jsonrpc2", $req_methods)) {
$req_methods[] = "jsondata";
$headers['Content-Type'] = "application/json-rpc";
$data = array_merge(array(