Allows or blocks HTTP Upgrade protocols (see http_upgrade_request_protocols) More...

#include <HttpUpgradeProtocolAccess.h>

Collaboration diagram for HttpUpgradeProtocolAccess:

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_accessfindGuard (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< NamedGuardNamedGuards
 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_accessother = 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

Definition at line 82 of file HttpUpgradeProtocolAccess.h.

Constructor & Destructor Documentation

◆ HttpUpgradeProtocolAccess() [1/2]

HttpUpgradeProtocolAccess::HttpUpgradeProtocolAccess ( )
default

◆ ~HttpUpgradeProtocolAccess()

HttpUpgradeProtocolAccess::~HttpUpgradeProtocolAccess ( )

Definition at line 44 of file HttpUpgradeProtocolAccess.cc.

References aclDestroyAccessList(), and other.

◆ HttpUpgradeProtocolAccess() [2/2]

HttpUpgradeProtocolAccess::HttpUpgradeProtocolAccess ( HttpUpgradeProtocolAccess &&  )
delete

Member Function Documentation

◆ configureGuard()

void HttpUpgradeProtocolAccess::configureGuard ( ConfigParser parser)

◆ findGuard()

const acl_access * HttpUpgradeProtocolAccess::findGuard ( const SBuf proto) const
Returns
the ACLs matching the given "name[/version]" protocol (or nil)

◆ forApplicable()

template<typename Visitor >
void HttpUpgradeProtocolAccess::forApplicable ( const ProtocolView offer,
const Visitor &  visitor 
) const
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()

template<typename Visitor >
void HttpUpgradeProtocolAccess::forEach ( const Visitor &  visitor) const
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

NamedGuards HttpUpgradeProtocolAccess::namedGuards
private

Definition at line 88 of file HttpUpgradeProtocolAccess.h.

Referenced by configureGuard(), forApplicable(), and forEach().

◆ other

acl_access* HttpUpgradeProtocolAccess::other = nullptr
private

◆ ProtoOther

const SBuf HttpUpgradeProtocolAccess::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:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors