From 793bd4dc66f249991a7f0aa1d55cb49c5b5f1363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 23 Mar 2021 18:31:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rpc/Service.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Rpc/Service.php b/Rpc/Service.php index 50fb5994..8d39dfa5 100644 --- a/Rpc/Service.php +++ b/Rpc/Service.php @@ -98,7 +98,7 @@ class Service extends Component if (is_string($body) && is_null($body = Json::decode($body))) { throw new Exception('Protocol format error.'); } - var_dump($body); + if (!isset($body['cmd'])) { throw new Exception('Unknown system cmd.'); } @@ -106,6 +106,8 @@ class Service extends Component $body['cmd'] = ltrim($body['cmd'], '/'); + var_dump('rpc/p' . $service['port'] . '/' . $body['cmd']); + $header = $request->headers; $header->replace('request_uri', 'rpc/p' . $service['port'] . '/' . $body['cmd']); $header->replace('request_method', Request::HTTP_CMD);