From ae527da57859cd7ce59fe7e939c4c744c31f8cc0 Mon Sep 17 00:00:00 2001 From: huberyxxiao Date: Wed, 8 Nov 2023 19:48:46 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=A2=84=E7=AD=BE=E5=90=8DURL=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E4=B8=B4=E6=97=B6=E5=AF=86=E9=92=A5=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/op/object_op.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/op/object_op.cpp b/src/op/object_op.cpp index 067b939..52e4fd7 100644 --- a/src/op/object_op.cpp +++ b/src/op/object_op.cpp @@ -1724,7 +1724,9 @@ std::string ObjectOp::GeneratePresignedUrl(const GeneratePresignedUrlReq& req) { } query_str += part; } - + if (query_str != "") { + signed_url += "&"; + } signed_url += query_str; return signed_url; } From da87e66b7d1dc7935f771bfd31bab486f0d730e0 Mon Sep 17 00:00:00 2001 From: huberyxxiao Date: Thu, 9 Nov 2023 19:36:02 +0800 Subject: [PATCH 2/3] fix_LogCallback --- include/cos_defines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cos_defines.h b/include/cos_defines.h index c1094e0..0aae96f 100644 --- a/include/cos_defines.h +++ b/include/cos_defines.h @@ -90,7 +90,7 @@ typedef enum compress_type { } \ { \ auto log_callback = CosSysConfig::GetLogCallback(); \ - if (log_callback) { \ + if (log_callback && level <= CosSysConfig::GetLogLevel()) { \ std::string logstr = \ LogUtil::FormatLog(level, "%s:%s(%d) " fmt "\n", __FILE__, __func__, \ __LINE__, ##__VA_ARGS__); \ From 5cb2f6216b30c9d28dc8b91c26ca01aae5384d69 Mon Sep 17 00:00:00 2001 From: huberyxxiao Date: Thu, 9 Nov 2023 19:38:19 +0800 Subject: [PATCH 3/3] fix --- src/op/object_op.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/op/object_op.cpp b/src/op/object_op.cpp index 52e4fd7..067b939 100644 --- a/src/op/object_op.cpp +++ b/src/op/object_op.cpp @@ -1724,9 +1724,7 @@ std::string ObjectOp::GeneratePresignedUrl(const GeneratePresignedUrlReq& req) { } query_str += part; } - if (query_str != "") { - signed_url += "&"; - } + signed_url += query_str; return signed_url; }