This commit is contained in:
2021-03-23 18:31:46 +08:00
parent c9e977e145
commit 793bd4dc66
+3 -1
View File
@@ -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);