diff --git a/VERSION b/VERSION index 860e4be..3a246b1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2309.80009 +0.2309.111925 diff --git a/src/Http/HttpRequest.php b/src/Http/HttpRequest.php index ec7c7d4..319c1c7 100644 --- a/src/Http/HttpRequest.php +++ b/src/Http/HttpRequest.php @@ -80,7 +80,7 @@ class HttpRequest extends HttpMessage { $build = new HttpRequestBuilder; $build->setHttpVersion(new Version(...array_map('intval', explode('.', substr($_SERVER['SERVER_PROTOCOL'], 5))))); $build->setMethod($_SERVER['REQUEST_METHOD']); - $build->setPath('/' . trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/')); + $build->setPath(parse_url('/' . trim($_SERVER['REQUEST_URI'], '/'), PHP_URL_PATH)); $build->setParams($_GET); $build->setCookies($_COOKIE); diff --git a/src/Routing/Route.php b/src/Routing/Route.php index fac985a..26fb6fd 100644 --- a/src/Routing/Route.php +++ b/src/Routing/Route.php @@ -16,7 +16,12 @@ class Route { private ?string $method; private string $path; - /** @internal */ + /** + * Creates a Route attribute. + * + * @param string $pathOrMethod Method name if this is registering a route, path if this is registering middleware. + * @param ?string $path Path if this registering a route, null if this is registering middleware. + */ public function __construct(string $pathOrMethod, ?string $path = null) { if($path === null) { $this->method = null;