in GameLiftPlugin/Source/AWSSDK/Include/aws/core/http/URI.h [136:155]
inline void AddPathSegments(T pathSegments)
{
Aws::StringStream ss;
ss << pathSegments;
Aws::String segments = ss.str();
const auto splitOption = s_preservePathSeparators
? Utils::StringUtils::SplitOptions::INCLUDE_EMPTY_SEGMENTS
: Utils::StringUtils::SplitOptions::NOT_SET;
// Preserve legacy behavior -- we need to remove a leading "/" if use `INCLUDE_EMPTY_SEGMENTS` is specified
// because string split will no longer ignore leading delimiters -- which is correct.
auto split = Aws::Utils::StringUtils::Split(segments, '/', splitOption);
if (s_preservePathSeparators && m_pathSegments.empty() && !split.empty() && split.front().empty() && !m_pathHasTrailingSlash) {
split.erase(split.begin());
}
for (const auto& segment: split)
{
m_pathSegments.push_back(segment);
}
m_pathHasTrailingSlash = (!segments.empty() && segments.back() == '/');
}