#include "squid.h"
#include "base/Assure.h"
#include "base/CharacterSet.h"
#include "base/EnumIterator.h"
#include "base/Raw.h"
#include "base64.h"
#include "globals.h"
#include "http/ContentLengthInterpreter.h"
#include "HttpHdrCc.h"
#include "HttpHdrContRange.h"
#include "HttpHdrScTarget.h"
#include "HttpHeader.h"
#include "HttpHeaderFieldStat.h"
#include "HttpHeaderStat.h"
#include "HttpHeaderTools.h"
#include "MemBuf.h"
#include "mgr/Registration.h"
#include "mime_header.h"
#include "sbuf/Stream.h"
#include "sbuf/StringConvert.h"
#include "SquidConfig.h"
#include "StatHist.h"
#include "Store.h"
#include "StrList.h"
#include "time/gadgets.h"
#include "TimeOrTag.h"
#include "util.h"
#include <algorithm>
#include <array>

Go to the source code of this file.
Macros | |
#define | SHORT_PREFIX_SIZE 512 |
Functions | |
std::vector< HttpHeaderFieldStat > | headerStatsTable (Http::HdrType::enumEnd_) |
static void | httpHeaderNoteParsedEntry (Http::HdrType id, String const &value, bool error) |
static void | httpHeaderStatDump (const HttpHeaderStat *hs, StoreEntry *e) |
static void | httpHeaderStoreReport (StoreEntry *e) |
static void | httpHeaderRegisterWithCacheManager (void) |
static void | httpHeaderMaskInit (HttpHeaderMask *mask, int value) |
static const char * | getStringPrefix (const char *str, size_t sz) |
void | httpHeaderInitModule (void) |
int | httpHeaderParseQuotedString (const char *start, const int len, String *val) |
SBuf | httpHeaderQuoteString (const char *raw) |
quotes string using RFC 7230 quoted-string rules More... | |
static void | httpHeaderFieldStatDumper (StoreEntry *sentry, int, double val, double, int count) |
static void | httpHeaderFldsPerHdrDumper (StoreEntry *sentry, int idx, double val, double, int count) |
Variables | |
static HttpHeaderMask | RequestHeadersMask |
static HttpHeaderMask | ReplyHeadersMask |
static std::array< HttpHeaderStat, hoEnd > | HttpHeaderStats |
static int | HeaderEntryParsedCount = 0 |
const HttpHeaderStat * | dump_stat = nullptr |
Macro Definition Documentation
◆ SHORT_PREFIX_SIZE
#define SHORT_PREFIX_SIZE 512 |
Function Documentation
◆ getStringPrefix()
|
static |
handy to printf prefixes of potentially very long buffers
Definition at line 129 of file HttpHeader.cc.
References LOCAL_ARRAY, SHORT_PREFIX_SIZE, and xstrncpy().
Referenced by HttpHeaderEntry::parse(), and HttpHeader::parse().
◆ headerStatsTable()
std::vector<HttpHeaderFieldStat> headerStatsTable | ( | Http::HdrType::enumEnd_ | ) |
◆ httpHeaderFieldStatDumper()
|
static |
Definition at line 1697 of file HttpHeader.cc.
References Http::any_valid_header(), HttpHeaderStat::busyDestroyedCount, CBIT_TEST, dump_stat, Http::HeaderLookupTable, Http::HeaderLookupTable_t::lookup(), Http::HeaderTableRecord::name, HttpHeaderStat::owner_mask, storeAppendPrintf(), and xdiv().
Referenced by httpHeaderStatDump().
◆ httpHeaderFldsPerHdrDumper()
|
static |
Definition at line 1714 of file HttpHeader.cc.
References HttpHeaderStat::destroyedCount, dump_stat, storeAppendPrintf(), and xpercent().
Referenced by httpHeaderStatDump().
◆ httpHeaderInitModule()
void httpHeaderInitModule | ( | void | ) |
Definition at line 138 of file HttpHeader.cc.
References assert, CBIT_SET, Http::enumEnd_, Http::HeaderLookupTable, hoEnd, httpHdrScInitModule(), httpHeaderRegisterWithCacheManager(), HttpHeaderStats, ReplyHeadersMask, and RequestHeadersMask.
Referenced by TestUfs::commonInit(), and mainInitialize().
◆ httpHeaderMaskInit()
|
static |
Definition at line 122 of file HttpHeader.cc.
Referenced by HttpHeader::clean(), HttpHeader::delByName(), HttpHeader::HttpHeader(), and HttpHeader::refreshMask().
◆ httpHeaderNoteParsedEntry()
|
static |
Definition at line 1676 of file HttpHeader.cc.
References Http::BAD_HDR, debugs, error(), Http::HeaderLookupTable, and headerStatsTable().
Referenced by HttpHeader::getCc(), HttpHeader::getContRange(), HttpHeaderEntry::getInt(), HttpHeaderEntry::getInt64(), HttpHeader::getLastStr(), HttpHeader::getRange(), HttpHeader::getSc(), HttpHeader::getStr(), and HttpHeader::getTime().
◆ httpHeaderParseQuotedString()
Parses a quoted-string field (RFC 2616 section 2.2), complains if something went wrong, returns non-zero on success. Un-escapes quoted-pair characters found within the string. start should point at the first double-quote.
Definition at line 167 of file HttpHeader.cc.
References String::append(), String::assign(), String::clean(), debugs, and String::termedBuf().
Referenced by HttpHdrSc::parse(), HttpHdrCc::parse(), Ftp::PrintReply(), and Http::SlowlyParseQuotedString().
◆ httpHeaderQuoteString()
SBuf httpHeaderQuoteString | ( | const char * | raw | ) |
Definition at line 237 of file HttpHeader.cc.
References SBuf::append(), and assert.
Referenced by Ftp::Relay::createHttpReply().
◆ httpHeaderRegisterWithCacheManager()
|
static |
Definition at line 114 of file HttpHeader.cc.
References httpHeaderStoreReport(), and Mgr::RegisterAction().
Referenced by httpHeaderInitModule().
◆ httpHeaderStatDump()
|
static |
Definition at line 1723 of file HttpHeader.cc.
References assert, HttpHeaderStat::ccTypeDistr, StatHist::dump(), dump_stat, HttpHeaderStat::fieldTypeDistr, HttpHeaderStat::hdrUCountDistr, httpHdrCcStatDumper(), httpHdrScStatDumper(), httpHeaderFieldStatDumper(), httpHeaderFldsPerHdrDumper(), HttpHeaderStat::label, HttpHeaderStat::owner_mask, HttpHeaderStat::scTypeDistr, and storeAppendPrintf().
Referenced by httpHeaderStoreReport().
◆ httpHeaderStoreReport()
|
static |
store report about current header usage and other stats
Definition at line 1754 of file HttpHeader.cc.
References assert, HeaderEntryParsedCount, Http::HeaderLookupTable, headerStatsTable(), hoReply, hoRequest, httpHeaderStatDump(), HttpHeaderStats, storeAppendPrintf(), and xpercent().
Referenced by httpHeaderRegisterWithCacheManager().
Variable Documentation
◆ dump_stat
const HttpHeaderStat * dump_stat = nullptr |
Definition at line 1694 of file HttpHeader.cc.
Referenced by httpHdrCcStatDumper(), httpHdrScStatDumper(), httpHdrScTargetStatDumper(), httpHeaderFieldStatDumper(), httpHeaderFldsPerHdrDumper(), and httpHeaderStatDump().
◆ HeaderEntryParsedCount
|
static |
Definition at line 94 of file HttpHeader.cc.
Referenced by httpHeaderStoreReport(), and HttpHeaderEntry::parse().
◆ HttpHeaderStats
|
static |
Definition at line 80 of file HttpHeader.cc.
Referenced by HttpHeader::clean(), HttpHeader::getCc(), HttpHeader::getSc(), httpHeaderInitModule(), httpHeaderStoreReport(), and HttpHeader::parse().
◆ ReplyHeadersMask
|
static |
Definition at line 76 of file HttpHeader.cc.
Referenced by httpHeaderInitModule().
◆ RequestHeadersMask
|
static |
Definition at line 73 of file HttpHeader.cc.
Referenced by httpHeaderInitModule().
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