改名
This commit is contained in:
@@ -430,7 +430,7 @@ class Request extends Application
|
|||||||
$headers = array_merge($headers, $request->header);
|
$headers = array_merge($headers, $request->header);
|
||||||
}
|
}
|
||||||
$sRequest->headers = new HttpHeaders($headers);
|
$sRequest->headers = new HttpHeaders($headers);
|
||||||
$sRequest->parseUri();
|
// $sRequest->parseUri();
|
||||||
return $sRequest;
|
return $sRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace HttpServer\Route;
|
|||||||
use Closure;
|
use Closure;
|
||||||
use Exception;
|
use Exception;
|
||||||
use HttpServer\Http\Context;
|
use HttpServer\Http\Context;
|
||||||
|
use HttpServer\Http\Request;
|
||||||
use HttpServer\IInterface\RouterInterface;
|
use HttpServer\IInterface\RouterInterface;
|
||||||
use HttpServer\Application;
|
use HttpServer\Application;
|
||||||
use HttpServer\Route\Annotation\Annotation;
|
use HttpServer\Route\Annotation\Annotation;
|
||||||
@@ -425,7 +426,7 @@ class Router extends Application implements RouterInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $request
|
* @param Request $request
|
||||||
* @return Node|false|int|mixed|string|null
|
* @return Node|false|int|mixed|string|null
|
||||||
*/
|
*/
|
||||||
private function find_path($request)
|
private function find_path($request)
|
||||||
@@ -435,7 +436,7 @@ class Router extends Application implements RouterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$methods = $this->nodes[$method];
|
$methods = $this->nodes[$method];
|
||||||
$uri = implode('/', $request->getExplode());
|
$uri = implode('/', $request->headers->getHeader('request_uri'));
|
||||||
if (!isset($methods[$uri])) {
|
if (!isset($methods[$uri])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user