mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-22 23:00:55 +00:00
Merge branch 'pratik/otel-phase1b-telemetry-infra' into pratik/otel-phase1c-rpc-integration
# Conflicts: # src/xrpld/app/main/GRPCServer.cpp
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <xrpld/rpc/json_body.h> // IWYU pragma: keep
|
||||
|
||||
#include <xrpl/basics/Log.h>
|
||||
#include <xrpl/basics/StringUtilities.h>
|
||||
#include <xrpl/basics/base64.h>
|
||||
#include <xrpl/basics/contract.h>
|
||||
#include <xrpl/basics/make_SSLContext.h>
|
||||
@@ -47,7 +48,6 @@
|
||||
#include <xrpl/server/detail/JSONRPCUtil.h>
|
||||
#include <xrpl/telemetry/SpanGuard.h>
|
||||
|
||||
#include <boost/algorithm/string/trim.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
@@ -117,7 +117,7 @@ authorized(Port const& port, std::map<std::string, std::string> const& h)
|
||||
if ((it == h.end()) || (!it->second.starts_with("Basic ")))
|
||||
return false;
|
||||
std::string strUserPass64 = it->second.substr(6);
|
||||
boost::trim(strUserPass64);
|
||||
strUserPass64 = trimWhitespace(strUserPass64);
|
||||
std::string const strUserPass = base64Decode(strUserPass64);
|
||||
std::string::size_type const nColon = strUserPass.find(':');
|
||||
if (nColon == std::string::npos)
|
||||
@@ -274,7 +274,7 @@ ServerHandler::onHandoff(
|
||||
static inline json::Output
|
||||
makeOutput(Session& session)
|
||||
{
|
||||
return [&](boost::beast::string_view const& b) { session.write(b.data(), b.size()); };
|
||||
return [&](std::string_view b) { session.write(b.data(), b.size()); };
|
||||
}
|
||||
|
||||
static std::map<std::string, std::string>
|
||||
@@ -600,11 +600,11 @@ ServerHandler::processSession(
|
||||
makeOutput(*session),
|
||||
coro,
|
||||
forwardedFor(session->request()),
|
||||
[&] {
|
||||
[&] -> std::string_view {
|
||||
auto const iter = session->request().find("X-User");
|
||||
if (iter != session->request().end())
|
||||
return iter->value();
|
||||
return boost::beast::string_view{};
|
||||
return {};
|
||||
}());
|
||||
|
||||
if (beast::rfc2616::isKeepAlive(session->request()))
|
||||
|
||||
Reference in New Issue
Block a user