Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.9.3 #163

Merged
merged 3 commits into from
Mar 7, 2019
Merged

2.9.3 #163

Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
log : test
  • Loading branch information
1019272778 committed Feb 1, 2019
commit d1217338941b57cac55b8ef7515b8e56d441c2d0
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