HttpHeaderTools.h
Go to the documentation of this file.
99 HeaderWithAcl() : aclList(nullptr), valueFormat(nullptr), fieldId(Http::HdrType::BAD_HDR), quoted(false) {}
130void httpHeaderPutStrf(HttpHeader * hdr, Http::HdrType id, const char *fmt,...) PRINTF_FORMAT_ARG3;
134void httpHdrMangleList(HttpHeader *, HttpRequest *, const AccessLogEntryPointer &al, req_or_rep_t req_or_rep);
void httpHdrMangleList(HttpHeader *, HttpRequest *, const AccessLogEntryPointer &al, req_or_rep_t req_or_rep)
Definition: HttpHeaderTools.cc:336
bool httpHeaderParseOffset(const char *start, int64_t *offPtr, char **endPtr=nullptr)
Definition: HttpHeaderTools.cc:137
int httpHeaderParseInt(const char *start, int *val)
Definition: HttpHeaderTools.cc:123
const char * getStringPrefix(const char *str, size_t len)
Definition: HttpHeaderTools.cc:110
void httpHeaderPutStrf(HttpHeader *hdr, Http::HdrType id, const char *fmt,...) PRINTF_FORMAT_ARG3
Definition: HttpHeaderTools.cc:54
bool httpHeaderHasConnDir(const HttpHeader *hdr, const SBuf &directive)
Definition: HttpHeaderTools.cc:91
Definition: Format.h:42
bool operator()(const std::string &lhs, const std::string &rhs) const
Definition: HttpHeaderTools.h:73
A collection of headerMangler objects for a given message kind.
Definition: HttpHeaderTools.h:48
HeaderManglers & operator=(const HeaderManglers &)
void dumpAccess(StoreEntry *entry, const char *optionName) const
report the *_header_access part of the configuration
Definition: HttpHeaderTools.cc:415
HeaderManglers(const HeaderManglers &)
const headerMangler * find(const HttpHeaderEntry &e) const
returns a header mangler for field e or nil if none was specified
Definition: HttpHeaderTools.cc:469
void setReplacement(const char *name, const char *replacementValue)
updates mangler for the named header with a replacement value
Definition: HttpHeaderTools.cc:458
std::map< std::string, headerMangler, NoCaseLessThan > ManglersByName
a name:mangler map; optimize: use unordered map or some such
Definition: HttpHeaderTools.h:79
headerMangler all
configured if some mangling ACL applies to all header names
Definition: HttpHeaderTools.h:88
headerMangler * track(const char *name)
returns a mangler for the named header (known or custom)
Definition: HttpHeaderTools.cc:441
void dumpReplacement(StoreEntry *entry, const char *optionName) const
report the *_header_replace part of the configuration
Definition: HttpHeaderTools.cc:427
headerMangler known[static_cast< int >(Http::HdrType::enumEnd_)]
one mangler for each known header
Definition: HttpHeaderTools.h:82
Definition: HttpHeaderTools.h:97
ACLList * aclList
when the header field should be added (always if nil)
Definition: HttpHeaderTools.h:108
Format::Format * valueFormat
compiled HTTP header field value (no macros)
Definition: HttpHeaderTools.h:111
std::string fieldValue
HTTP header field value, possibly with macros.
Definition: HttpHeaderTools.h:105
Definition: HttpHeader.h:51
Definition: HttpHeader.h:75
Definition: HttpRequest.h:49
Definition: Store.h:42
Definition: HttpHeaderTools.h:40
Definition: forward.h:18