protected function verifyPath($urlParts)
    {
        if (isset($urlParts['path'])) {
            $path = $urlParts['path'];
        
            if (substr($path, -1) !== '/' && (strrpos($path, '.') === false || strrpos($path, '.') < strrpos($path, '/'))) {
                $path .= '/';
            }

            $urlParts['path'] = $path;
        }
        
        return $urlParts;
    }