Skip to content

Commit

Permalink
trailing / messes up signing of request
Browse files Browse the repository at this point in the history
  • Loading branch information
rw2 committed Nov 19, 2024
1 parent 72bfb9a commit 6aa4eb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/S3Commands.cc
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ bool AmazonS3Head::SendRequest() {
// ---------------------------------------------------------------------------

bool AmazonS3List::SendRequest(const std::string &continuationToken) {
// query_parameters["list-type"] = "2"; // Version 2 of the object-listing
// API query_parameters["delimiter"] = "/";
query_parameters["list-type"] = "2"; // Version 2 of the object-listing
query_parameters["delimiter"] = "/";
query_parameters["prefix"] = urlquote(object);
query_parameters["encoding-type"] = "url";
if (!continuationToken.empty()) {
Expand Down
3 changes: 2 additions & 1 deletion test/s3_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ TEST(TestS3URLGeneration, Test1) {
TestAmazonRequest pathReq{serviceUrl, "akf", "skf", b, o, "path", 4};
std::string generatedHostUrl = pathReq.getHostUrl();
ASSERT_EQ(generatedHostUrl,
"https://s3-service.com:443/test-bucket/test-object");
"https://s3-service.com:443/test-bucket/test-object")
<< "generatedURL: " << generatedHostUrl;

// Test virtual-style URL generation
TestAmazonRequest virtReq{serviceUrl, "akf", "skf", b, o, "virtual", 4};
Expand Down

0 comments on commit 6aa4eb9

Please sign in to comment.