URI.split will fail it there's some special characters in url, escape url hopefully fixes it.