protected static function getDefaultService()
    {
        $service = (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
        $parts = parse_url($service);

        if (isset($parts['query'])) {
            parse_str($parts['query'], $query);
        } else {
            $query = array();
        }
        unset($query['ticket']);
        $parts['query'] = http_build_query($query);

        return self::build_url($parts);
    }