Skip to content

Commit 22126ab

Browse files
committed
path-saparator
1 parent 4c605df commit 22126ab

File tree

2 files changed

+6
-2
lines changed
  • src/aws-cpp-sdk-core

2 files changed

+6
-2
lines changed

src/aws-cpp-sdk-core/include/aws/core/http/URI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ namespace Aws
153153
{
154154
m_pathSegments.push_back(segment);
155155
}
156-
m_pathHasTrailingSlash = s_preservePathSeparators ? (!segments.empty() && segments.back() == '/') : m_pathSegments.empty() && (!segments.empty() && segments.back() == '/');
156+
m_pathHasTrailingSlash = !segments.empty() && segments.back() == '/';
157157
}
158158

159159
/**

src/aws-cpp-sdk-core/source/http/URI.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,11 @@ Aws::String URI::GetPath() const
206206
path.append(segment);
207207
}
208208

209-
if (m_pathSegments.empty() || m_pathHasTrailingSlash)
209+
if (m_pathSegments.empty())
210+
{
211+
path.push_back('/');
212+
}
213+
else if (m_pathHasTrailingSlash)
210214
{
211215
path.push_back('/');
212216
}

0 commit comments

Comments
 (0)