Skip to content

Commit

Permalink
log : test
Browse files Browse the repository at this point in the history
  • Loading branch information
1019272778 committed Feb 1, 2019
1 parent 2b7de55 commit d121733
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public class HttpdnsMini {
private ConcurrentMap<String, HostObject> hostManager = new ConcurrentHashMap<String, HostObject>();
private ExecutorService pool = Executors.newFixedThreadPool(MAX_THREAD_NUM);

public boolean isHttp2Test = false;

private HttpdnsMini() {
}

Expand All @@ -53,9 +51,6 @@ public static HttpdnsMini getInstance() {
}

public String getIpByHostAsync(String hostName) {
if (isHttp2Test){
return "118.178.62.19";
}
HostObject host = hostManager.get(hostName);
if (host == null || host.isExpired()) {
OSSLog.logDebug("[httpdnsmini] - refresh host: " + hostName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,7 @@ public String buildCanonicalURL() throws Exception{
String baseURL = endpoint.toString();

if (!TextUtils.isEmpty(bucketName)) {
if (OSSUtils.isValidateIP(originHost)) {
// ip address
baseURL = endpoint.toString() + "/" + bucketName;
} else if (OSSUtils.isOssOriginHost(originHost)) {
if (OSSUtils.isOssOriginHost(originHost)) {
// official endpoint
originHost = bucketName + "." + originHost;
String urlHost = null;
Expand All @@ -341,6 +338,9 @@ public String buildCanonicalURL() throws Exception{
} else {
baseURL = scheme + "://" + originHost;
}
}else if (OSSUtils.isValidateIP(originHost)) {
// ip address
baseURL = endpoint.toString() + "/" + bucketName;
} else {
// cname时不做任何处理
baseURL = endpoint.toString();
Expand Down

0 comments on commit d121733

Please sign in to comment.