0
0
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:
James Yonan 2016-05-27 23:12:02 -06:00
parent 94c61e5864
commit 387c8f04c0

View File

@ -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;
}
}
}