private function checkEndpoint($endpoint, $isCName)
{
$ret_endpoint = null;
if (strpos($endpoint, 'http://') === 0) {
$ret_endpoint = substr($endpoint, strlen('http://'));
} elseif (strpos($endpoint, 'https://') === 0) {
$ret_endpoint = substr($endpoint, strlen('https://'));
$this->useSSL = true;
} else {
$ret_endpoint = $endpoint;
}
if ($isCName) {
$this->hostType = self::OSS_HOST_TYPE_CNAME;
} elseif (OssUtil::isIPFormat($ret_endpoint)) {
$this->hostType = self::OSS_HOST_TYPE_IP;
} else {
$this->hostType = self::OSS_HOST_TYPE_NORMAL;
}
return $ret_endpoint;
}