File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/aws-cpp-sdk-core/include/aws/core/http
tests/aws-cpp-sdk-s3-unit-tests Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ namespace Aws
153153 {
154154 m_pathSegments.push_back (segment);
155155 }
156- m_pathHasTrailingSlash = (m_pathSegments .empty () || !s_preservePathSeparators ) && (!segments.empty () && segments.back () == ' /' );
156+ m_pathHasTrailingSlash = s_preservePathSeparators ? (!segments .empty () && segments. back () == ' / ' ) : m_pathSegments. empty ( ) && (!segments.empty () && segments.back () == ' /' );
157157 }
158158
159159 /* *
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ TEST_F(S3UnitTest, S3UriPathPreservationOn) {
226226
227227 auto putObjectRequest = PutObjectRequest ()
228228 .WithBucket (" velvetunderground" )
229- .WithKey (" ////stephanie////says////////////that////////she//wants///////to/know.txt" );
229+ .WithKey (" ////stephanie////says////////////that////////she//wants///////to/know.txt/ " );
230230
231231 std::shared_ptr<IOStream> body = Aws::MakeShared<StringStream>(ALLOCATION_TAG,
232232 " What country shall I say is calling From across the world?" ,
@@ -247,7 +247,7 @@ TEST_F(S3UnitTest, S3UriPathPreservationOn) {
247247 AWS_EXPECT_SUCCESS (response);
248248
249249 const auto seenRequest = _mockHttpClient->GetMostRecentHttpRequest ();
250- EXPECT_EQ (" https://velvetunderground.s3.us-east-1.amazonaws.com/////stephanie////says////////////that////////she//wants///////to/know.txt" , seenRequest.GetUri ().GetURIString ());
250+ EXPECT_EQ (" https://velvetunderground.s3.us-east-1.amazonaws.com/////stephanie////says////////////that////////she//wants///////to/know.txt/ " , seenRequest.GetUri ().GetURIString ());
251251}
252252
253253TEST_F (S3UnitTest, S3EmbeddedErrorTest) {
You can’t perform that action at this time.
0 commit comments