HttpHeaderTools.cc
Go to the documentation of this file.
42static void httpHeaderPutStrvf(HttpHeader * hdr, Http::HdrType id, const char *fmt, va_list vargs);
43static void httpHdrAdd(HttpHeader *heads, HttpRequest *request, const AccessLogEntryPointer &al, HeaderWithAclList &headersAdd);
213 while (end < (start+len) && *end != '\\' && *end != '\"' && (unsigned char)*end > 0x1F && *end != 0x7F)
276httpHdrMangle(HttpHeaderEntry * e, HttpRequest * request, HeaderManglers *hms, const AccessLogEntryPointer &al)
326httpHdrMangleList(HttpHeader *l, HttpRequest *request, const AccessLogEntryPointer &al, req_or_rep_t req_or_rep)
420 header_mangler_dump_replacement(entry, name, known[id], Http::HeaderLookupTable.lookup(id).name);
488httpHdrAdd(HttpHeader *heads, HttpRequest *request, const AccessLogEntryPointer &al, HeaderWithAclList &headersAdd)
498 for (HeaderWithAclList::const_iterator hwa = headersAdd.begin(); hwa != headersAdd.end(); ++hwa) {
HttpHdrContRange * httpHdrContRangeCreate(void)
Definition: HttpHdrContRange.cc:118
void httpHdrContRangeSet(HttpHdrContRange *cr, HttpHdrRangeSpec spec, int64_t ent_len)
Definition: HttpHdrContRange.cc:220
bool httpHeaderParseOffset(const char *start, int64_t *value, char **endPtr)
Definition: HttpHeaderTools.cc:136
SBuf httpHeaderQuoteString(const char *raw)
quotes string using RFC 7230 quoted-string rules
Definition: HttpHeaderTools.cc:237
static int httpHdrMangle(HttpHeaderEntry *e, HttpRequest *request, HeaderManglers *hms, const AccessLogEntryPointer &al)
Definition: HttpHeaderTools.cc:276
int httpHeaderParseInt(const char *start, int *value)
Definition: HttpHeaderTools.cc:122
static void header_mangler_dump_replacement(StoreEntry *entry, const char *option, const headerMangler &m, const char *name)
Definition: HttpHeaderTools.cc:380
#define SHORT_PREFIX_SIZE
static void header_mangler_clean(headerMangler &m)
Definition: HttpHeaderTools.cc:363
void httpHeaderAddContRange(HttpHeader *hdr, HttpHdrRangeSpec spec, int64_t ent_len)
Definition: HttpHeaderTools.cc:75
void httpHeaderPutStrf(HttpHeader *hdr, Http::HdrType id, const char *fmt,...)
Definition: HttpHeaderTools.cc:53
const char * getStringPrefix(const char *str, size_t sz)
Definition: HttpHeaderTools.cc:109
static void header_mangler_dump_access(StoreEntry *entry, const char *option, const headerMangler &m, const char *name)
Definition: HttpHeaderTools.cc:370
void httpHdrMangleList(HttpHeader *l, HttpRequest *request, const AccessLogEntryPointer &al, req_or_rep_t req_or_rep)
Definition: HttpHeaderTools.cc:326
static void httpHeaderPutStrvf(HttpHeader *hdr, Http::HdrType id, const char *fmt, va_list vargs)
Definition: HttpHeaderTools.cc:64
int httpHeaderParseQuotedString(const char *start, const int len, String *val)
Definition: HttpHeaderTools.cc:167
void httpHeaderMaskInit(HttpHeaderMask *mask, int value)
Definition: HttpHeaderTools.cc:46
static void httpHdrAdd(HttpHeader *heads, HttpRequest *request, const AccessLogEntryPointer &al, HeaderWithAclList &headersAdd)
Definition: HttpHeaderTools.cc:488
bool httpHeaderHasConnDir(const HttpHeader *hdr, const SBuf &directive)
Definition: HttpHeaderTools.cc:90
int strListIsMember(const String *list, const SBuf &m, char del)
Definition: StrList.cc:46
Definition: FilledChecklist.h:33
AccessLogEntry::Pointer al
info for the future access.log, and external ACL
Definition: FilledChecklist.h:101
A collection of headerMangler objects for a given message kind.
Definition: HttpHeaderTools.h:48
void dumpAccess(StoreEntry *entry, const char *optionName) const
report the *_header_access part of the configuration
Definition: HttpHeaderTools.cc:405
const headerMangler * find(const HttpHeaderEntry &e) const
returns a header mangler for field e or nil if none was specified
Definition: HttpHeaderTools.cc:459
void setReplacement(const char *name, const char *replacementValue)
updates mangler for the named header with a replacement value
Definition: HttpHeaderTools.cc:448
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:431
void dumpReplacement(StoreEntry *entry, const char *optionName) const
report the *_header_replace part of the configuration
Definition: HttpHeaderTools.cc:417
headerMangler known[static_cast< int >(Http::HdrType::enumEnd_)]
one mangler for each known header
Definition: HttpHeaderTools.h:82
Definition: HttpHdrContRange.h:18
Definition: HttpHeaderRange.h:27
Definition: HttpHeader.h:51
Definition: HttpHeader.h:72
HttpHeaderEntry * getEntry(HttpHeaderPos *pos) const
Definition: HttpHeader.cc:590
Definition: HttpRequest.h:49
const HeaderTableRecord & lookup(const char *buf, const std::size_t len) const
look record type up by name (C-string and length)
Definition: RegisteredHeaders.cc:32
Definition: MemBuf.h:24
HeaderManglers * request_header_access
request_header_access and request_header_replace
Definition: SquidConfig.h:469
HeaderManglers * reply_header_access
reply_header_access and reply_header_replace
Definition: SquidConfig.h:471
Definition: Store.h:42
Definition: SquidString.h:26
Definition: EnumIterator.h:222
Definition: HttpHeaderTools.h:40
void dump_acl_access(StoreEntry *entry, const char *name, acl_access *head)
Definition: cache_cf.cc:1515
bool any_HdrType_enum_value(const Http::HdrType id)
match any known header type, including OTHER and BAD
Definition: RegisteredHeaders.h:205
const HeaderLookupTable_t HeaderLookupTable
Definition: RegisteredHeaders.cc:60