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);