Allows or blocks HTTP Upgrade protocols (see http_upgrade_request_protocols) More...
#include <HttpUpgradeProtocolAccess.h>
Classes | |
class | NamedGuard |
a single configured access rule for an explicitly named protocol More... | |
Public Member Functions | |
HttpUpgradeProtocolAccess ()=default | |
~HttpUpgradeProtocolAccess () | |
HttpUpgradeProtocolAccess (HttpUpgradeProtocolAccess &&)=delete | |
const acl_access * | findGuard (const SBuf &proto) const |
void | configureGuard (ConfigParser &) |
parses a single allow/deny rule More... | |
template<typename Visitor > | |
void | forEach (const Visitor &) const |
iterates over all configured rules, calling the given visitor More... | |
template<typename Visitor > | |
void | forApplicable (const ProtocolView &, const Visitor &) const |
Private Types | |
typedef std::deque< NamedGuard > | NamedGuards |
maps HTTP Upgrade protocol name/version to the ACLs guarding its usage More... | |
Private Attributes | |
NamedGuards | namedGuards |
rules governing upgrades to explicitly named protocols More... | |
acl_access * | other = nullptr |
OTHER rules governing unnamed protocols. More... | |
Static Private Attributes | |
static const SBuf | ProtoOther |
pseudonym to specify rules for "all other protocols" More... | |
Detailed Description
Definition at line 47 of file HttpUpgradeProtocolAccess.h.
Member Typedef Documentation
◆ NamedGuards
|
private |
Definition at line 82 of file HttpUpgradeProtocolAccess.h.
Constructor & Destructor Documentation
◆ HttpUpgradeProtocolAccess() [1/2]
|
default |
◆ ~HttpUpgradeProtocolAccess()
HttpUpgradeProtocolAccess::~HttpUpgradeProtocolAccess | ( | ) |
Definition at line 44 of file HttpUpgradeProtocolAccess.cc.
References aclDestroyAccessList(), and other.
◆ HttpUpgradeProtocolAccess() [2/2]
|
delete |
Member Function Documentation
◆ configureGuard()
void HttpUpgradeProtocolAccess::configureGuard | ( | ConfigParser & | parser | ) |
Definition at line 50 of file HttpUpgradeProtocolAccess.cc.
References acl_access, aclParseAccessLine(), cfg_directive, SBuf::cmp(), Here, namedGuards, ConfigParser::NextToken(), other, ProtoOther, and ToSBuf().
◆ findGuard()
const acl_access * HttpUpgradeProtocolAccess::findGuard | ( | const SBuf & | proto | ) | const |
- Returns
- the ACLs matching the given "name[/version]" protocol (or nil)
◆ forApplicable()
|
inline |
iterates over rules applicable to the given protocol, calling visitor; breaks iteration if the visitor returns true
Definition at line 106 of file HttpUpgradeProtocolAccess.h.
References ProtocolView::name, namedGuards, other, ProtoOther, and vAinB().
Referenced by HttpStateData::forwardUpgrade().
◆ forEach()
|
inline |
Definition at line 96 of file HttpUpgradeProtocolAccess.h.
References namedGuards, other, and ProtoOther.
Referenced by dump_http_upgrade_request_protocols().
Member Data Documentation
◆ namedGuards
|
private |
Definition at line 88 of file HttpUpgradeProtocolAccess.h.
Referenced by configureGuard(), forApplicable(), and forEach().
◆ other
|
private |
Definition at line 91 of file HttpUpgradeProtocolAccess.h.
Referenced by ~HttpUpgradeProtocolAccess(), configureGuard(), forApplicable(), and forEach().
◆ ProtoOther
|
staticprivate |
Definition at line 85 of file HttpUpgradeProtocolAccess.h.
Referenced by configureGuard(), forApplicable(), and forEach().
The documentation for this class was generated from the following files: