aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2020-02-12 12:28:26 -0500
committerfanquake <fanquake@gmail.com>2021-09-02 13:17:46 +0800
commit93551862a18965bcee0c883c54807e8726e2f50f (patch)
tree8597b629b4795006ccafa65a2aba04cc8b5b5f15 /src
parent77e77e8544c7df5981da9795cda5f1aaa99f73af (diff)
downloadbitcoin-93551862a18965bcee0c883c54807e8726e2f50f.tar.xz
Replace use of boost::trim use with locale-independent TrimString
Diffstat (limited to 'src')
-rw-r--r--src/httprpc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/httprpc.cpp b/src/httprpc.cpp
index e11e4acb5c..9ae592be79 100644
--- a/src/httprpc.cpp
+++ b/src/httprpc.cpp
@@ -10,6 +10,7 @@
#include <rpc/protocol.h>
#include <rpc/server.h>
#include <util/strencodings.h>
+#include <util/string.h>
#include <util/system.h>
#include <util/translation.h>
#include <walletinitinterface.h>
@@ -22,7 +23,7 @@
#include <set>
#include <string>
-#include <boost/algorithm/string.hpp> // boost::trim
+#include <boost/algorithm/string.hpp>
/** WWW-Authenticate to present with 401 Unauthorized response */
static const char* WWW_AUTH_HEADER_DATA = "Basic realm=\"jsonrpc\"";
@@ -130,8 +131,7 @@ static bool RPCAuthorized(const std::string& strAuth, std::string& strAuthUserna
return false;
if (strAuth.substr(0, 6) != "Basic ")
return false;
- std::string strUserPass64 = strAuth.substr(6);
- boost::trim(strUserPass64);
+ std::string strUserPass64 = TrimString(strAuth.substr(6));
std::string strUserPass = DecodeBase64(strUserPass64);
if (strUserPass.find(':') != std::string::npos)