Skip to content

Commit

Permalink
Merge pull request #158 from tencentyun/feature_huberyxxiao_024bd8e2
Browse files Browse the repository at this point in the history
Feature huberyxxiao 024bd8e2
  • Loading branch information
Huberyxiao authored Apr 12, 2024
2 parents 41eeb4a + 9ae64be commit 5c135f4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/cos_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace qcloud_cos {

#define COS_CPP_SDK_VERSON "v5.5.10"
#define COS_CPP_SDK_VERSON "v5.5.11"

/// 路径分隔符
const std::string kPathDelimiter = "/";
Expand Down
2 changes: 1 addition & 1 deletion src/cos_sys_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ unsigned CosSysConfig::m_dns_cache_expire_seconds = 600;
// dns cache大小
unsigned CosSysConfig::m_dns_cache_size = 1000;

bool CosSysConfig::m_retry_change_domain = true;
bool CosSysConfig::m_retry_change_domain = false;

std::mutex m_intranet_addr_lock;
std::mutex m_dest_domain_lock;
Expand Down
11 changes: 9 additions & 2 deletions src/op/object_op.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2017, Tencent Inc.
// Copyright (c) 2017, Tencent Inc.
// All rights reserved.
//
// Author: sevenyou <[email protected]>
Expand Down Expand Up @@ -337,7 +337,11 @@ CosResult ObjectOp::HeadObject(const HeadObjectReq& req, HeadObjectResp* resp, b
std::string host = CosSysConfig::GetHost(GetAppId(), m_config->GetRegion(),
req.GetBucketName(),change_backup_domain);
std::string path = req.GetPath();
return NormalAction(host, path, req, "", false, resp);
CosResult result = NormalAction(host, path, req, "", false, resp);
if (result.GetHttpStatus() == 404){
result.SetErrorCode("NoSuchKey");
}
return result;
}

CosResult ObjectOp::GetObject(const GetObjectByStreamReq& req,
Expand Down Expand Up @@ -1781,6 +1785,9 @@ void ObjectOp::FillCopyTask(const std::string& upload_id,
}

std::string ObjectOp::GeneratePresignedUrl(const GeneratePresignedUrlReq& req) {
if (req.GetObjectName().empty()) {
return "ObjectName does not support empty, please check!";
}
std::string auth_str = "";

std::string host;
Expand Down

0 comments on commit 5c135f4

Please sign in to comment.