diff --git a/src/S3Commands.cc b/src/S3Commands.cc index 44f8ff6..3911155 100644 --- a/src/S3Commands.cc +++ b/src/S3Commands.cc @@ -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()) { diff --git a/test/s3_tests.cc b/test/s3_tests.cc index 099b334..f943e75 100644 --- a/test/s3_tests.cc +++ b/test/s3_tests.cc @@ -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};