#include <RegisteredHeaders.h>

Collaboration diagram for Http::HeaderLookupTable_t:

Public Member Functions

 HeaderLookupTable_t ()
const HeaderTableRecordlookup (const char *buf, const std::size_t len) const
 look record type up by name (C-string and length) More...
const HeaderTableRecordlookup (const std::string &key) const
 look record type up by name (std::string) More...
const HeaderTableRecordlookup (const SBuf &key) const
 look record type up by name (SBuf) More...
const HeaderTableRecordlookup (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 180 of file RegisteredHeaders.h.

Constructor & Destructor Documentation

◆ HeaderLookupTable_t()

Http::HeaderLookupTable_t::HeaderLookupTable_t ( )

Definition at line 46 of file RegisteredHeaders.cc.

Member Function Documentation

◆ initCache()

void Http::HeaderLookupTable_t::initCache ( )

◆ lookup() [1/4]

◆ lookup() [2/4]

const HeaderTableRecord& Http::HeaderLookupTable_t::lookup ( const std::string &  key) const

Definition at line 186 of file RegisteredHeaders.h.

◆ lookup() [3/4]

const HeaderTableRecord& Http::HeaderLookupTable_t::lookup ( const SBuf key) const

Definition at line 190 of file RegisteredHeaders.h.

References SBuf::length(), and SBuf::rawContent().

◆ lookup() [4/4]

const HeaderTableRecord& Http::HeaderLookupTable_t::lookup ( Http::HdrType  id) const

Definition at line 194 of file RegisteredHeaders.h.

Member Data Documentation

◆ BadHdr

const HeaderTableRecord Http::HeaderLookupTable_t::BadHdr {"*INVALID*:", Http::HdrType::BAD_HDR, Http::HdrFieldType::ftInvalid, HdrKind::None}

Definition at line 201 of file RegisteredHeaders.h.

Referenced by lookup().

◆ idCache

std::vector<const HeaderTableRecord *> Http::HeaderLookupTable_t::idCache

Definition at line 200 of file RegisteredHeaders.h.

The documentation for this class was generated from the following files:






Web Site Translations