mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 06:52:43 +01:00
decodeQuery Take std::string_view not string ref
This commit is contained in:
parent
d7612f350f
commit
4083eff0c0
2 changed files with 3 additions and 3 deletions
|
|
@ -179,7 +179,7 @@ try {
|
|||
.scheme = scheme,
|
||||
.authority = authority,
|
||||
.path = path,
|
||||
.query = decodeQuery(std::string(query)),
|
||||
.query = decodeQuery(query),
|
||||
.fragment = fragment,
|
||||
};
|
||||
} catch (boost::system::system_error & e) {
|
||||
|
|
@ -201,7 +201,7 @@ std::string percentEncode(std::string_view s, std::string_view keep)
|
|||
s, [keep](char c) { return boost::urls::unreserved_chars(c) || keep.find(c) != keep.npos; });
|
||||
}
|
||||
|
||||
StringMap decodeQuery(const std::string & query)
|
||||
StringMap decodeQuery(std::string_view query)
|
||||
try {
|
||||
/* For back-compat unescaped characters are allowed. */
|
||||
auto fixedEncodedQuery = percentEncodeCharSet(query, extraAllowedCharsInQuery);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue