Skip to content

Commit 05eabae

Browse files
committed
std::ranges::to is not fully supported, fuck it
1 parent e3982f1 commit 05eabae

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/s3cpp/auth.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,11 @@ class AWSSigV4Signer {
8585
uri = uri.substr(begin_q + 1);
8686
begin_q = uri.find("&");
8787
const std::string query_param = uri.substr(0, begin_q);
88-
auto parts = std::views::split(query_param, '=')
89-
| std::views::transform([](auto&& range) {
90-
return std::string(range.begin(), range.end());
91-
})
92-
| std::ranges::to<std::vector<std::string>>();
93-
query_params[parts[0]] = parts[1];
88+
// Split query params by '=' character
89+
// Key=Value -> [Key, Value]
90+
const int equalPos = query_param.find('=');
91+
auto q = std::pair<std::string, std::string>(query_param.substr(0, equalPos), query_param.substr(equalPos+1));
92+
query_params[q.first] = q.second;
9493
}
9594
// Insert alphabetically-sorted query params on the Cannonical Request
9695
std::string query_str = "";

0 commit comments

Comments
 (0)