protected function normalizePath(string $path): string
    {
        $path = \rtrim($path, '/');

        if (empty($path) || \mb_strpos($path, '/')) {
            $path = '/';
        }

        return $path;
    }
protected function normalizePath(string $path): string
    {
        $path = \rtrim($path, '/');

        if (empty($path) || \mb_strpos($path, '/')) {
            $path = '/';
        }

        return $path;
    }
protected function normalizePath ( string $ path ) : string { $ path = \ rtrim ( $ path , '/' ) ; if ( empty ( $ path ) || \ mb_strpos ( $ path , '/' ) ) { $ path = '/' ; } return $ path ; }
Processes path as per spec in RFC 6265.

@param string $path

@return string

@see http://tools.ietf.org/html/rfc6265#section-5.1.4
@see http://tools.ietf.org/html/rfc6265#section-5.2.4
Processes path as per spec in RFC 6265 .