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