This commit is contained in:
2021-08-13 15:29:41 +08:00
parent 22c11fca68
commit 68bbc90920
2 changed files with 7 additions and 7 deletions
+6 -7
View File
@@ -6,7 +6,6 @@ namespace HttpServer\Route;
use Annotation\Aspect; use Annotation\Aspect;
use Annotation\Route\RpcProducer;
use Closure; use Closure;
use Exception; use Exception;
use HttpServer\Exception\RequestException; use HttpServer\Exception\RequestException;
@@ -80,12 +79,12 @@ class Node
*/ */
public function unpack(string $data): mixed public function unpack(string $data): mixed
{ {
if ($this->_dataType == RpcProducer::PROTOCOL_JSON) { // if ($this->_dataType == RpcProducer::PROTOCOL_JSON) {
return json_decode($data, true); // return json_decode($data, true);
} // }
if ($this->_dataType == RpcProducer::PROTOCOL_SERIALIZE) { // if ($this->_dataType == RpcProducer::PROTOCOL_SERIALIZE) {
return unserialize($data); // return unserialize($data);
} // }
return $data; return $data;
} }
+1
View File
@@ -537,6 +537,7 @@ class Router extends HttpService implements RouterInterface
return null; return null;
} }
$node = $this->tree_search(['*'], $request->getMethod()); $node = $this->tree_search(['*'], $request->getMethod());
var_dump($node, $request->getMethod());
if (!($node instanceof Node)) { if (!($node instanceof Node)) {
return null; return null;
} }