diff --git a/src/Application/MicroPresenter.php b/src/Application/MicroPresenter.php index 21fcb35f8..974d6f286 100644 --- a/src/Application/MicroPresenter.php +++ b/src/Application/MicroPresenter.php @@ -54,7 +54,7 @@ public function run(Application\Request $request): Application\Response && !$this->httpRequest->isAjax() && ($request->isMethod('get') || $request->isMethod('head')) ) { - $refUrl = $this->httpRequest->getUrl()->withoutUserInfo(); + $refUrl = $this->httpRequest->getUrl(); $url = $this->router->constructUrl($request->toArray(), $refUrl); if ($url !== null && !$refUrl->isEqual($url)) { return new Responses\RedirectResponse($url, Http\IResponse::S301_MovedPermanently); @@ -124,7 +124,7 @@ public function createTemplate(?string $class = null, ?callable $latteFactory = $template->presenter = $this; $template->context = $this->context; if ($this->httpRequest) { - $url = $this->httpRequest->getUrl()->withoutUserInfo(); + $url = $this->httpRequest->getUrl(); $template->baseUrl = rtrim($url->getBaseUrl(), '/'); $template->basePath = rtrim($url->getBasePath(), '/'); } diff --git a/src/Application/UI/Presenter.php b/src/Application/UI/Presenter.php index 7c78c463e..73f4d964f 100644 --- a/src/Application/UI/Presenter.php +++ b/src/Application/UI/Presenter.php @@ -712,7 +712,7 @@ public function canonicalize(?string $destination = null, ...$args): void } catch (InvalidLinkException $e) { } - if (!isset($url) || $this->httpRequest->getUrl()->withoutUserInfo()->isEqual($url)) { + if (!isset($url) || $this->httpRequest->getUrl()->isEqual($url)) { return; } @@ -975,7 +975,7 @@ protected function requestToUrl(Application\Request $request, ?bool $relative = { if (!isset($this->refUrlCache)) { $url = $this->httpRequest->getUrl(); - $this->refUrlCache = new Http\UrlScript($url->withoutUserInfo()->getHostUrl() . $url->getScriptPath()); + $this->refUrlCache = new Http\UrlScript($url->getHostUrl() . $url->getScriptPath()); } if (!$this->router) {