#include <RegisteredHeaders.h>
Public Member Functions | |
HeaderLookupTable_t () | |
const HeaderTableRecord & | lookup (const char *buf, const std::size_t len) const |
look record type up by name (C-string and length) More... | |
const HeaderTableRecord & | lookup (const std::string &key) const |
look record type up by name (std::string) More... | |
const HeaderTableRecord & | lookup (const SBuf &key) const |
look record type up by name (SBuf) More... | |
const HeaderTableRecord & | lookup (Http::HdrType id) const |
look record type up by header ID More... | |
Private Member Functions | |
void | initCache () |
Private Attributes | |
std::vector< const HeaderTableRecord * > | idCache |
Static Private Attributes | |
static const HeaderTableRecord | BadHdr {"*INVALID*:", Http::HdrType::BAD_HDR, Http::HdrFieldType::ftInvalid, HdrKind::None} |
used to signal "not found" from lookups More... | |
Detailed Description
Class for looking up registered header definitions
Look up HeaderTableRecord's by name or registered header ID.
Actual records are defined in file RegisteredHeadersHash.gperf, which is compiled using gperf to RegisteredHeadersHash.cci which is then included in RegisteredHeaders.cc.
Definition at line 178 of file RegisteredHeaders.h.
Constructor & Destructor Documentation
◆ HeaderLookupTable_t()
Http::HeaderLookupTable_t::HeaderLookupTable_t | ( | ) |
Definition at line 40 of file RegisteredHeaders.cc.
References initCache().
Member Function Documentation
◆ initCache()
|
private |
Definition at line 46 of file RegisteredHeaders.cc.
References assert, HttpHeaderDefinitionsTable, idCache, MAX_HASH_VALUE, MIN_HASH_VALUE, and TOTAL_KEYWORDS.
Referenced by HeaderLookupTable_t().
◆ lookup() [1/4]
const HeaderTableRecord & Http::HeaderLookupTable_t::lookup | ( | const char * | buf, |
const std::size_t | len | ||
) | const |
Definition at line 32 of file RegisteredHeaders.cc.
References BadHdr, Http::HeaderTableRecord::id, HttpHeaderHashTable::lookup(), and Http::OTHER.
Referenced by HttpHeaderEntry::HttpHeaderEntry(), HttpHeader::hasNamed(), httpHeaderFieldStatDumper(), lookup(), Http::operator<<(), ACLHTTPHeaderData::parse(), HttpHeaderEntry::parse(), parse_HeaderWithAclList(), and HeaderManglers::track().
◆ lookup() [2/4]
|
inline |
Definition at line 188 of file RegisteredHeaders.h.
References SBuf::length(), lookup(), and SBuf::rawContent().
◆ lookup() [3/4]
|
inline |
Definition at line 184 of file RegisteredHeaders.h.
References lookup().
◆ lookup() [4/4]
|
inline |
Definition at line 192 of file RegisteredHeaders.h.
References idCache.
Member Data Documentation
◆ BadHdr
|
staticprivate |
Definition at line 199 of file RegisteredHeaders.h.
Referenced by lookup().
◆ idCache
|
private |
Definition at line 198 of file RegisteredHeaders.h.
Referenced by initCache(), and lookup().
The documentation for this class was generated from the following files:
- src/http/RegisteredHeaders.h
- src/http/RegisteredHeaders.cc
- src/tests/stub_libhttp.cc