From af8314f345d09e1804f0b6333ef9ca718983ec9a Mon Sep 17 00:00:00 2001 From: "hugh@douyu.tv" <13147199592@163.com> Date: Wed, 6 Jan 2021 20:31:50 +0800 Subject: [PATCH] fix:uri join error --- services/bos/api/object.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/bos/api/object.go b/services/bos/api/object.go index 4d1772d9..99948627 100644 --- a/services/bos/api/object.go +++ b/services/bos/api/object.go @@ -674,9 +674,9 @@ func GeneratePresignedUrl(conf *bce.BceClientConfiguration, signer auth.Signer, domain = domain[:pos] } if len(bucket) != 0 && net.ParseIP(domain) == nil { // not use an IP as the endpoint by client - req.SetUri(bce.URI_PREFIX + object) + req.SetUri(bce.URI_PREFIX + bucket + bce.URI_PREFIX + object) if !conf.CnameEnabled && !isCnameLikeHost(conf.Endpoint) { - req.SetHost(bucket + "." + req.Host()) + req.SetHost(req.Host()) } } else { req.SetUri(getObjectUri(bucket, object))