in Sources/OSS/Internal/ClientImpl.swift [416:430]
func buildHost(endpoint: String, pathStyle: AddressStyleType) throws -> String {
guard let temComs = URLComponents(string: endpoint),
var host = temComs.host
else {
throw ClientError.requestError(detail: "Endpoint format error.")
}
if let bucketName = bucket {
if pathStyle != .cname {
host = bucketName.appending(".").appending(host)
}
}
return host
}