HttpHeaderTools.cc
Go to the documentation of this file.
43 static void httpHeaderPutStrvf(HttpHeader * hdr, Http::HdrType id, const char *fmt, va_list vargs);
44 static void httpHdrAdd(HttpHeader *heads, HttpRequest *request, const AccessLogEntryPointer &al, HeaderWithAclList &headersAdd);
214 while (end < (start+len) && *end != '\\' && *end != '\"' && (unsigned char)*end > 0x1F && *end != 0x7F)
238 Http::SlowlyParseQuotedString(const char * const description, const char * const start, const size_t length)
286 httpHdrMangle(HttpHeaderEntry * e, HttpRequest * request, HeaderManglers *hms, const AccessLogEntryPointer &al)
331 httpHdrMangleList(HttpHeader *l, HttpRequest *request, const AccessLogEntryPointer &al, req_or_rep_t req_or_rep)
425 header_mangler_dump_replacement(entry, name, known[id], Http::HeaderLookupTable.lookup(id).name);
493 httpHdrAdd(HttpHeader *heads, HttpRequest *request, const AccessLogEntryPointer &al, HeaderWithAclList &headersAdd)
HttpHdrContRange * httpHdrContRangeCreate(void)
Definition: HttpHdrContRange.cc:118
Definition: FilledChecklist.h:33
Definition: HttpHeaderRange.h:26
void httpHdrMangleList(HttpHeader *l, HttpRequest *request, const AccessLogEntryPointer &al, req_or_rep_t req_or_rep)
Definition: HttpHeaderTools.cc:331
static void header_mangler_dump_replacement(StoreEntry *entry, const char *option, const headerMangler &m, const char *name)
Definition: HttpHeaderTools.cc:385
void httpHdrContRangeSet(HttpHdrContRange *cr, HttpHdrRangeSpec spec, int64_t ent_len)
Definition: HttpHdrContRange.cc:220
const headerMangler * find(const HttpHeaderEntry &e) const
returns a header mangler for field e or nil if none was specified
Definition: HttpHeaderTools.cc:464
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:436
void httpHeaderPutStrf(HttpHeader *hdr, Http::HdrType id, const char *fmt,...)
Definition: HttpHeaderTools.cc:54
bool any_HdrType_enum_value(const Http::HdrType id)
match any known header type, including OTHER and BAD
Definition: RegisteredHeaders.h:204
Definition: HttpHeader.h:50
Definition: EnumIterator.h:221
Definition: HttpRequest.h:48
headerMangler all
configured if some mangling ACL applies to all header names
Definition: HttpHeaderTools.h:88
int httpHeaderParseQuotedString(const char *start, const int len, String *val)
Definition: HttpHeaderTools.cc:168
bool httpHeaderHasConnDir(const HttpHeader *hdr, const SBuf &directive)
Definition: HttpHeaderTools.cc:91
HeaderManglers * reply_header_access
reply_header_access and reply_header_replace
Definition: SquidConfig.h:463
int strListIsMember(const String *list, const SBuf &m, char del)
Definition: StrList.cc:46
void dump_acl_access(StoreEntry *entry, const char *name, acl_access *head)
Definition: cache_cf.cc:1511
Definition: MemBuf.h:23
SBuf StringToSBuf(const String &s)
create a new SBuf from a String by copying contents
Definition: StringConvert.h:17
A collection of headerMangler objects for a given message kind.
Definition: HttpHeaderTools.h:47
bool httpHeaderParseOffset(const char *start, int64_t *value, char **endPtr)
Definition: HttpHeaderTools.cc:137
SBuf httpHeaderQuoteString(const char *raw)
quotes string using RFC 7230 quoted-string rules
Definition: HttpHeaderTools.cc:247
Definition: SquidString.h:25
SBuf SlowlyParseQuotedString(const char *description, const char *start, size_t length)
Definition: HttpHeaderTools.cc:238
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
void dumpReplacement(StoreEntry *entry, const char *optionName) const
report the *_header_replace part of the configuration
Definition: HttpHeaderTools.cc:422
Definition: HttpHeaderTools.h:39
const HeaderLookupTable_t HeaderLookupTable
Definition: RegisteredHeaders.cc:60
static void header_mangler_clean(headerMangler &m)
Definition: HttpHeaderTools.cc:368
const char * getStringPrefix(const char *str, size_t sz)
Definition: HttpHeaderTools.cc:110
void dumpAccess(StoreEntry *entry, const char *optionName) const
report the *_header_access part of the configuration
Definition: HttpHeaderTools.cc:410
Definition: Store.h:37
static void httpHdrAdd(HttpHeader *heads, HttpRequest *request, const AccessLogEntryPointer &al, HeaderWithAclList &headersAdd)
Definition: HttpHeaderTools.cc:493
void httpHeaderMaskInit(HttpHeaderMask *mask, int value)
Definition: HttpHeaderTools.cc:47
static void header_mangler_dump_access(StoreEntry *entry, const char *option, const headerMangler &m, const char *name)
Definition: HttpHeaderTools.cc:375
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63
int httpHeaderParseInt(const char *start, int *value)
Definition: HttpHeaderTools.cc:123
#define SHORT_PREFIX_SIZE
Definition: HttpHdrContRange.h:17
static int httpHdrMangle(HttpHeaderEntry *e, HttpRequest *request, HeaderManglers *hms, const AccessLogEntryPointer &al)
Definition: HttpHeaderTools.cc:286
HttpHeaderEntry * getEntry(HttpHeaderPos *pos) const
Definition: HttpHeader.cc:583
HeaderManglers * request_header_access
request_header_access and request_header_replace
Definition: SquidConfig.h:461
void updateAle(const AccessLogEntry::Pointer &)
Definition: FilledChecklist.cc:242
void httpHeaderAddContRange(HttpHeader *hdr, HttpHdrRangeSpec spec, int64_t ent_len)
Definition: HttpHeaderTools.cc:76
Definition: HttpHeader.h:74
void setReplacement(const char *name, const char *replacementValue)
updates mangler for the named header with a replacement value
Definition: HttpHeaderTools.cc:453
static void httpHeaderPutStrvf(HttpHeader *hdr, Http::HdrType id, const char *fmt, va_list vargs)
Definition: HttpHeaderTools.cc:65
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products