mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-12 10:30:08 +01:00
http: replace boost::split with SplitString
Also removes boost/algorithm/string.hpp from expected includes
This commit is contained in:
parent
0d7efcdf75
commit
d1a9850102
2 changed files with 5 additions and 6 deletions
|
@ -21,8 +21,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <boost/algorithm/string.hpp>
|
|
||||||
|
|
||||||
/** WWW-Authenticate to present with 401 Unauthorized response */
|
/** WWW-Authenticate to present with 401 Unauthorized response */
|
||||||
static const char* WWW_AUTH_HEADER_DATA = "Basic realm=\"jsonrpc\"";
|
static const char* WWW_AUTH_HEADER_DATA = "Basic realm=\"jsonrpc\"";
|
||||||
|
|
||||||
|
@ -276,8 +274,10 @@ static bool InitRPCAuthentication()
|
||||||
std::set<std::string>& whitelist = g_rpc_whitelist[strUser];
|
std::set<std::string>& whitelist = g_rpc_whitelist[strUser];
|
||||||
if (pos != std::string::npos) {
|
if (pos != std::string::npos) {
|
||||||
std::string strWhitelist = strRPCWhitelist.substr(pos + 1);
|
std::string strWhitelist = strRPCWhitelist.substr(pos + 1);
|
||||||
std::set<std::string> new_whitelist;
|
std::vector<std::string> whitelist_split = SplitString(strWhitelist, ", ");
|
||||||
boost::split(new_whitelist, strWhitelist, boost::is_any_of(", "));
|
std::set<std::string> new_whitelist{
|
||||||
|
std::make_move_iterator(whitelist_split.begin()),
|
||||||
|
std::make_move_iterator(whitelist_split.end())};
|
||||||
if (intersect) {
|
if (intersect) {
|
||||||
std::set<std::string> tmp_whitelist;
|
std::set<std::string> tmp_whitelist;
|
||||||
std::set_intersection(new_whitelist.begin(), new_whitelist.end(),
|
std::set_intersection(new_whitelist.begin(), new_whitelist.end(),
|
||||||
|
|
|
@ -21,8 +21,7 @@ EXCLUDED_DIRS = ["src/leveldb/",
|
||||||
"src/minisketch/",
|
"src/minisketch/",
|
||||||
"src/univalue/"]
|
"src/univalue/"]
|
||||||
|
|
||||||
EXPECTED_BOOST_INCLUDES = ["boost/algorithm/string.hpp",
|
EXPECTED_BOOST_INCLUDES = ["boost/algorithm/string/replace.hpp",
|
||||||
"boost/algorithm/string/replace.hpp",
|
|
||||||
"boost/date_time/posix_time/posix_time.hpp",
|
"boost/date_time/posix_time/posix_time.hpp",
|
||||||
"boost/multi_index/hashed_index.hpp",
|
"boost/multi_index/hashed_index.hpp",
|
||||||
"boost/multi_index/ordered_index.hpp",
|
"boost/multi_index/ordered_index.hpp",
|
||||||
|
|
Loading…
Add table
Reference in a new issue