private function getNormalizedUriPath()
    {
        $path = $this->getPath();

        if ($this->getAuthority() === '') {
            return preg_replace('#^/+#', '/', $path);
        } elseif ($path === '' || $path[0] === '/') {
            return $path;
        }

        return '/' . $path;
    }