Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
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