why not rtrim the $url when the $url contains the $sessionId?
why not do the rtrim when you set the $url at the first time?
$url = rtrim($this->info['url'], '/');