From 7e836f56152f2f7ec663e8c7b59979c152ed7eae Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Fri, 7 Feb 2020 15:24:12 +0900 Subject: [PATCH] Update webpagetool.php --- helper/webpagetool.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/helper/webpagetool.php b/helper/webpagetool.php index 7148681..1202e66 100644 --- a/helper/webpagetool.php +++ b/helper/webpagetool.php @@ -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(