This commit is contained in:
2021-09-18 10:43:49 +08:00
parent 77a3819272
commit 13fadb5ffc
+2 -2
View File
@@ -39,9 +39,9 @@ class TestRequest
/** @var Handler $handler */
$handler = HandlerManager::get($request->server['request_uri'], $request->getMethod());
if (is_integer($handler)) {
$PsrResponse->withStatus($handler)->withBody(null);
$PsrResponse->withStatus($handler)->withBody(new Stream('Allow Method[' . $request->getMethod() . '].'));
} else if (is_null($handler)) {
$PsrResponse->withStatus(404)->withBody(null);
$PsrResponse->withStatus(404)->withBody(new Stream('Page not found.'));
} else {
$PsrResponse = $this->handler($handler, $PsrRequest);
}