From b915de8af616fd61d4d3b248d4a5c8819eaab660 Mon Sep 17 00:00:00 2001 From: Rich Wellner Date: Tue, 19 Nov 2024 13:06:50 -0600 Subject: [PATCH] trailing / messes up signing of request --- src/S3Commands.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/S3Commands.cc b/src/S3Commands.cc index 3911155..c5cc9b6 100644 --- a/src/S3Commands.cc +++ b/src/S3Commands.cc @@ -83,7 +83,7 @@ bool AmazonRequest::parseURL(const std::string &url, std::string &bucket_path, path = "/" + object; bucket_path = "/" + object.substr(0, object.find('/')); } else { - path = "/" + bucket; + path = "/" + bucket + "/" + object; bucket_path = "/" + bucket; } } else { @@ -565,6 +565,7 @@ bool AmazonS3List::SendRequest(const std::string &continuationToken) { // Operation is on the bucket itself; alter the URL to remove the object hostUrl = getProtocol() + "://" + host + bucketPath; + canonicalURI = bucketPath; return SendS3Request(""); }