-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #158 from tencentyun/feature_huberyxxiao_024bd8e2
Feature huberyxxiao 024bd8e2
- Loading branch information
Showing
3 changed files
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]> | ||
|
@@ -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, | ||
|
@@ -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; | ||
|