#include <bitcoin-build-config.h>
#include <httpserver.h>
#include <chainparamsbase.h>
#include <common/args.h>
#include <common/messages.h>
#include <common/url.h>
#include <compat/compat.h>
#include <logging.h>
#include <netbase.h>
#include <node/interface_ui.h>
#include <rpc/protocol.h>
#include <span.h>
#include <sync.h>
#include <util/check.h>
#include <util/signalinterrupt.h>
#include <util/sock.h>
#include <util/strencodings.h>
#include <util/thread.h>
#include <util/threadnames.h>
#include <util/threadpool.h>
#include <util/time.h>
#include <util/translation.h>
#include <condition_variable>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <memory>
#include <optional>
#include <span>
#include <string>
#include <string_view>
#include <thread>
#include <unordered_map>
#include <vector>
#include <sys/types.h>
#include <sys/stat.h>
Go to the source code of this file.
◆ ClientAllowed()
| static bool ClientAllowed |
( |
const CNetAddr & |
netaddr | ) |
|
|
static |
Check if a network address is allowed to access the HTTP server.
Definition at line 81 of file httpserver.cpp.
◆ GetBindAddresses()
| static std::vector< std::pair< std::string, uint16_t > > GetBindAddresses |
( |
| ) |
|
|
static |
◆ GUARDED_BY()
◆ InitHTTPAllowList()
| static bool InitHTTPAllowList |
( |
| ) |
|
|
static |
Initialize ACL list for HTTP server.
Definition at line 92 of file httpserver.cpp.
◆ MaybeDispatchRequestToWorker()
| static void MaybeDispatchRequestToWorker |
( |
std::shared_ptr< HTTPRequest > |
hreq | ) |
|
|
static |
◆ RegisterHTTPHandler()
| void RegisterHTTPHandler |
( |
const std::string & |
prefix, |
|
|
bool |
exactMatch, |
|
|
const HTTPRequestHandler & |
handler |
|
) |
| |
Register handler for prefix.
If multiple handlers match a prefix, the first-registered one will be invoked.
Definition at line 241 of file httpserver.cpp.
◆ RejectRequest()
◆ RequestMethodString()
HTTP request method as string - use for logging only.
Definition at line 115 of file httpserver.cpp.
◆ UnregisterHTTPHandler()
| void UnregisterHTTPHandler |
( |
const std::string & |
prefix, |
|
|
bool |
exactMatch |
|
) |
| |
◆ g_http_server
◆ g_httppathhandlers_mutex
◆ g_max_queue_depth
| int g_max_queue_depth {100} |
|
static |
◆ g_threadpool_http
Http thread pool - future: encapsulate in HttpContext
◆ rpc_allow_subnets
| std::vector<CSubNet> rpc_allow_subnets |
|
static |
List of subnets to allow RPC connections from.
Definition at line 71 of file httpserver.cpp.
◆ SELECT_TIMEOUT
| constexpr auto SELECT_TIMEOUT {50ms} |
|
staticconstexpr |
The set of sockets cannot be modified while waiting, so the sleep time needs to be small to avoid new sockets stalling.
Definition at line 48 of file httpserver.cpp.
◆ SOCKET_OPTION_TRUE
| constexpr int SOCKET_OPTION_TRUE {1} |
|
staticconstexpr |
Explicit alias for setting socket option methods.
Definition at line 51 of file httpserver.cpp.