mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 04:02:15 +02:00
urlencode : removed match_path() and match_prefix() as they
are no longer used and are redundant with URL::decode_path().
This commit is contained in:
parent
94c61e5864
commit
387c8f04c0
@ -95,25 +95,6 @@ namespace openvpn {
|
||||
i = decode(i);
|
||||
return list;
|
||||
}
|
||||
|
||||
inline bool match_path(const std::string& uri, const std::vector<std::string>& choices)
|
||||
{
|
||||
if (uri.empty())
|
||||
return false;
|
||||
if (uri[0] != '/')
|
||||
return false;
|
||||
return std::find(choices.begin(), choices.end(), uri.substr(1)) != choices.end();
|
||||
}
|
||||
|
||||
inline bool match_prefix(const std::string& uri, const std::vector<std::string>& choices)
|
||||
{
|
||||
for (const auto &c : choices)
|
||||
{
|
||||
if (string::starts_with(uri, std::string("/") + c + std::string("/")))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user