Public Member Functions | |
DetailEntryParser () | |
void | clean () |
void | append (const HttpHeader *src) |
void | update (const HttpHeader *fresh) |
bool | needUpdate (const HttpHeader *fresh) const |
void | compact () |
int | parse (const char *header_start, size_t len, Http::ContentLengthInterpreter &interpreter) |
int | parse (const char *buf, size_t buf_len, bool atEnd, size_t &hdr_sz, Http::ContentLengthInterpreter &interpreter) |
void | packInto (Packable *p, bool mask_sensitive_info=false) const |
HttpHeaderEntry * | getEntry (HttpHeaderPos *pos) const |
HttpHeaderEntry * | findEntry (Http::HdrType id) const |
int | delByName (const SBuf &name) |
int | delByName (const char *name) |
int | delById (Http::HdrType id) |
void | delAt (HttpHeaderPos pos, int &headers_deleted) |
void | refreshMask () |
void | addEntry (HttpHeaderEntry *e) |
String | getList (Http::HdrType id) const |
bool | getList (Http::HdrType id, String *s) const |
bool | conflictingContentLength () const |
String | getStrOrList (Http::HdrType id) const |
String | getByName (const SBuf &name) const |
String | getByName (const char *name) const |
String | getById (Http::HdrType id) const |
bool | getByIdIfPresent (Http::HdrType id, String *result) const |
bool | hasNamed (const SBuf &s, String *value=nullptr) const |
bool | hasNamed (const char *name, unsigned int namelen, String *value=nullptr) const |
SBuf | getByNameListMember (const char *name, const char *member, const char separator) const |
SBuf | getListMember (Http::HdrType id, const char *member, const char separator) const |
int | has (Http::HdrType id) const |
void | addVia (const AnyP::ProtocolVersion &ver, const HttpHeader *from=nullptr) |
void | putInt (Http::HdrType id, int number) |
void | putInt64 (Http::HdrType id, int64_t number) |
void | putTime (Http::HdrType id, time_t htime) |
void | putStr (Http::HdrType id, const char *str) |
void | putAuth (const char *auth_scheme, const char *realm) |
void | putCc (const HttpHdrCc &cc) |
void | putContRange (const HttpHdrContRange *cr) |
void | putRange (const HttpHdrRange *range) |
void | putSc (HttpHdrSc *sc) |
void | putExt (const char *name, const char *value) |
void | updateOrAddStr (Http::HdrType, const SBuf &) |
int | getInt (Http::HdrType id) const |
int64_t | getInt64 (Http::HdrType id) const |
time_t | getTime (Http::HdrType id) const |
const char * | getStr (Http::HdrType id) const |
const char * | getLastStr (Http::HdrType id) const |
HttpHdrCc * | getCc () const |
HttpHdrRange * | getRange () const |
HttpHdrSc * | getSc () const |
HttpHdrContRange * | getContRange () const |
SBuf | getAuthToken (Http::HdrType id, const char *auth_scheme) const |
ETag | getETag (Http::HdrType id) const |
TimeOrTag | getTimeOrTag (Http::HdrType id) const |
int | hasListMember (Http::HdrType id, const char *member, const char separator) const |
int | hasByNameListMember (const char *name, const char *member, const char separator) const |
void | removeHopByHopEntries () |
bool | chunked () const |
bool | unsupportedTe () const |
whether message used an unsupported and/or invalid Transfer-Encoding More... | |
Public Attributes | |
std::vector< HttpHeaderEntry *, PoolingAllocator< HttpHeaderEntry * > > | entries |
HttpHeaderMask | mask |
http_hdr_owner_type | owner |
int | len |
Protected Member Functions | |
void | removeConnectionHeaderEntries () |
bool | skipUpdateHeader (const Http::HdrType id) const |
Static Protected Member Functions | |
static bool | Isolate (const char **parse_start, size_t l, const char **blk_start, const char **blk_end) |
Private Member Functions | |
HttpHeaderEntry * | findLastEntry (Http::HdrType id) const |
Private Attributes | |
bool | conflictingContentLength_ |
bool | teUnsupported_ = false |
Detailed Description
Definition at line 164 of file ErrorDetailManager.cc.
Constructor & Destructor Documentation
◆ DetailEntryParser()
|
inline |
Definition at line 167 of file ErrorDetailManager.cc.
Member Function Documentation
◆ addEntry()
|
inherited |
Definition at line 737 of file HttpHeader.cc.
References Http::any_HdrType_enum_value(), assert, Http::BAD_HDR, CBIT_SET, CBIT_TEST, debugs, HttpHeader::entries, headerStatsTable(), HttpHeaderEntry::id, HttpHeader::len, HttpHeaderEntry::length(), SBuf::length(), HttpHeader::mask, and HttpHeaderEntry::name.
Referenced by HttpHeader::append(), copyOneHeaderFromClientsideRequestToUpstreamRequest(), Adaptation::Icap::ModXact::encapsulateHead(), Ftp::Server::handleFeatReply(), HttpStateData::httpBuildRequestHeader(), httpHdrAdd(), HttpReply::make304(), HttpHeader::parse(), HttpHeader::putCc(), HttpHeader::putContRange(), HttpHeader::putExt(), HttpHeader::putInt(), HttpHeader::putInt64(), HttpHeader::putRange(), HttpHeader::putSc(), HttpHeader::putStr(), HttpHeader::putTime(), HttpHeader::update(), and HttpHeader::updateOrAddStr().
◆ addVia()
|
inherited |
Appends "this cache" information to VIA header field. Takes the initial VIA value from "from" parameter, if provided.
Definition at line 946 of file HttpHeader.cc.
References SBuf::append(), SBuf::appendf(), Config, HttpHeader::getList(), SBuf::isEmpty(), AnyP::ProtocolVersion::major, AnyP::ProtocolVersion::minor, SquidConfig::onoff, AnyP::PROTO_HTTP, AnyP::PROTO_HTTPS, AnyP::PROTO_NONE, AnyP::PROTO_UNKNOWN, AnyP::ProtocolVersion::protocol, AnyP::ProtocolType_str, StringToSBuf(), ThisCache, HttpHeader::updateOrAddStr(), Http::VIA, and SquidConfig::via.
Referenced by clientReplyContext::buildReplyHeader(), and HttpStateData::httpBuildRequestHeader().
◆ append()
|
inherited |
Definition at line 232 of file HttpHeader.cc.
References HttpHeader::addEntry(), assert, debugs, and HttpHeader::entries.
Referenced by ESIVarState::ESIVarState(), HttpReply::clone(), and HttpRequest::clone().
◆ chunked()
|
inlineinherited |
whether the message uses chunked Transfer-Encoding optimized implementation relies on us rejecting/removing other codings
Definition at line 169 of file HttpHeader.h.
References HttpHeader::has(), and Http::TRANSFER_ENCODING.
Referenced by HttpRequest::checkEntityFraming(), clientProcessRequest(), HttpReply::expectingBody(), HttpRequest::expectingBody(), and HttpStateData::processReplyHeader().
◆ clean()
|
inherited |
Definition at line 186 of file HttpHeader.cc.
References Http::any_valid_header(), assert, HttpHeader::conflictingContentLength_, DBG_CRITICAL, debugs, HttpHeader::entries, hoEnd, hoNone, hoReply, httpHeaderMaskInit(), HttpHeaderStats, HttpHeader::len, HttpHeader::mask, HttpHeader::owner, and HttpHeader::teUnsupported_.
Referenced by ESIVarState::~ESIVarState(), HttpHeader::~HttpHeader(), HttpStateData::buildRequestPrefix(), HttpReply::clean(), HttpRequest::clean(), clientPackRangeHdr(), htcpClear(), htcpHandleTstResponse(), htcpQuery(), htcpTstReply(), HttpHeader::operator=(), HttpHeader::parse(), ESIInclude::Start(), and Http::Tunneler::writeRequest().
◆ compact()
|
inherited |
Definition at line 712 of file HttpHeader.cc.
References HttpHeader::entries.
Referenced by HttpReply::recreateOnNotModified().
◆ conflictingContentLength()
|
inlineinherited |
Definition at line 113 of file HttpHeader.h.
References HttpHeader::conflictingContentLength_.
Referenced by HttpRequest::checkEntityFraming().
◆ delAt()
|
inherited |
Definition at line 695 of file HttpHeader.cc.
References assert, HttpHeader::entries, HttpHeaderInitPos, HttpHeader::len, SBuf::length(), HttpHeaderEntry::name, String::size(), and HttpHeaderEntry::value.
Referenced by clientReplyContext::buildReplyHeader(), HttpHeader::delById(), HttpHeader::delByName(), httpHdrMangleList(), HttpHeader::removeConnectionHeaderEntries(), and HttpHeader::removeHopByHopEntries().
◆ delById()
|
inherited |
Definition at line 667 of file HttpHeader.cc.
References Http::any_registered_header(), assert, CBIT_CLR, CBIT_TEST, debugs, HttpHeader::delAt(), HttpHeader::getEntry(), HttpHeaderInitPos, and HttpHeader::mask.
Referenced by Http::Stream::buildRangeHeader(), clientReplyContext::buildReplyHeader(), clientInterpretRequestHeaders(), Adaptation::Icap::ModXact::encapsulateHead(), ESIContextNew(), HttpHeader::parse(), clientReplyContext::processConditional(), HttpHeader::putCc(), HttpHeader::putContRange(), HttpHeader::putRange(), HttpHeader::putSc(), HttpReply::removeIrrelevantContentLength(), and HttpHeader::update().
◆ delByName() [1/2]
|
inlineinherited |
- Deprecated:
- use SBuf method instead. performance regression: reallocates
Definition at line 106 of file HttpHeader.h.
References HttpHeader::delByName().
Referenced by HttpHeader::delByName().
◆ delByName() [2/2]
deletes all fields with a given name, if any.
- Returns
- #fields deleted
Definition at line 648 of file HttpHeader.cc.
References CBIT_SET, debugs, HttpHeader::delAt(), HttpHeader::getEntry(), HttpHeaderInitPos, httpHeaderMaskInit(), and HttpHeader::mask.
Referenced by HttpHeader::update().
◆ findEntry()
|
inherited |
Definition at line 603 of file HttpHeader.cc.
References Http::any_registered_header(), assert, CBIT_TEST, HttpHeader::entries, Http::HeaderLookupTable, and HttpHeader::mask.
Referenced by clientReplyContext::buildReplyHeader(), HttpHeader::getContRange(), HttpHeader::getETag(), HttpHeader::getInt(), HttpHeader::getInt64(), HttpHeader::getRange(), HttpHeader::getStr(), HttpHeader::getStrOrList(), HttpHeader::getTime(), HttpHeader::getTimeOrTag(), Ftp::Server::handleRequest(), HttpReply::make304(), HttpHeader::packInto(), and Ftp::Relay::sendCommand().
◆ findLastEntry()
|
privateinherited |
Definition at line 628 of file HttpHeader.cc.
References Http::any_registered_header(), assert, CBIT_TEST, HttpHeader::entries, Http::HeaderLookupTable, and HttpHeader::mask.
Referenced by HttpHeader::getLastStr().
◆ getAuthToken()
|
inherited |
Definition at line 1276 of file HttpHeader.cc.
References assert, base64_decode_final(), base64_decode_init(), BASE64_DECODE_LENGTH, base64_decode_update(), HttpHeader::getStr(), Store::nil, SBuf::rawAppendFinish(), SBuf::rawAppendStart(), and xisspace.
Referenced by Ftp::Gateway::checkAuth(), and CacheManager::ParseHeaders().
◆ getById()
|
inherited |
Definition at line 858 of file HttpHeader.cc.
References HttpHeader::getByIdIfPresent().
◆ getByIdIfPresent()
|
inherited |
returns true iff a [possibly empty] field identified by id is there when returning true, also sets the result
parameter (if it is not nil)
Definition at line 872 of file HttpHeader.cc.
References Http::BAD_HDR, HttpHeader::getStrOrList(), and HttpHeader::has().
Referenced by HttpHeader::getById(), HttpHeader::hasNamed(), and HttpHeader::parse().
◆ getByName() [1/2]
|
inherited |
Definition at line 840 of file HttpHeader.cc.
References HttpHeader::hasNamed().
◆ getByName() [2/2]
Definition at line 849 of file HttpHeader.cc.
References HttpHeader::hasNamed().
Referenced by Format::Format::assemble(), assembleVaryKey(), Adaptation::Icap::Options::cfgIntHeader(), Adaptation::Icap::Options::cfgTransferList(), Adaptation::Icap::Options::configure(), HttpHeader::getByNameListMember(), HttpHeader::hasByNameListMember(), HttpHeader::needUpdate(), Ssl::ErrorDetailFile::parse(), and Ftp::Server::writeErrorReply().
◆ getByNameListMember()
|
inherited |
searches for the first matching key=value pair within the name-identified field
- Returns
- the value of the found pair or an empty string
Definition at line 918 of file HttpHeader.cc.
References assert, HttpHeader::getByName(), and getListMember().
Referenced by Format::Format::assemble().
◆ getCc()
|
inherited |
Definition at line 1195 of file HttpHeader.cc.
References Http::CACHE_CONTROL, CBIT_TEST, HttpHeader::getList(), httpHdrCcUpdateStats(), httpHeaderNoteParsedEntry(), HttpHeaderStats, HttpHeader::mask, HttpHeader::owner, and HttpHdrCc::parse().
Referenced by HttpStateData::httpBuildRequestHeader().
◆ getContRange()
|
inherited |
Definition at line 1262 of file HttpHeader.cc.
References Http::CONTENT_RANGE, HttpHeader::findEntry(), httpHdrContRangeParseCreate(), httpHeaderNoteParsedEntry(), HttpHeaderEntry::id, String::termedBuf(), and HttpHeaderEntry::value.
Referenced by HttpReply::hdrCacheInit().
◆ getEntry()
|
inherited |
Definition at line 584 of file HttpHeader.cc.
References assert, HttpHeader::entries, and HttpHeaderInitPos.
Referenced by Format::Format::assemble(), clientReplyContext::buildReplyHeader(), clientCheckPinning(), HttpHeader::delById(), HttpHeader::delByName(), HttpHeader::getList(), Ftp::Server::handleFeatReply(), HttpHeader::hasNamed(), HttpStateData::httpBuildRequestHeader(), httpHdrMangleList(), HttpHeader::packInto(), Ftp::PrintReply(), HttpHeader::removeConnectionHeaderEntries(), HttpHeader::removeHopByHopEntries(), and HttpHeader::update().
◆ getETag()
|
inherited |
Definition at line 1318 of file HttpHeader.cc.
References assert, etagParseInit(), HttpHeader::findEntry(), Http::ftETag, Http::HeaderLookupTable, String::termedBuf(), and HttpHeaderEntry::value.
Referenced by clientIfRangeMatch(), and StoreEntry::hasOneOfEtags().
◆ getInt()
|
inherited |
Definition at line 1121 of file HttpHeader.cc.
References Http::any_registered_header(), assert, HttpHeader::findEntry(), Http::ftInt, HttpHeaderEntry::getInt(), and Http::HeaderLookupTable.
Referenced by Ftp::Server::handleFeatReply(), Ftp::PrintReply(), and Ftp::Server::writeForwardedReplyAndCall().
◆ getInt64()
|
inherited |
Definition at line 1134 of file HttpHeader.cc.
References Http::any_registered_header(), assert, HttpHeader::findEntry(), Http::ftInt64, HttpHeaderEntry::getInt64(), and Http::HeaderLookupTable.
Referenced by clientGetMoreData(), clientProcessRequest(), ftpSendStor(), HttpReply::hdrCacheInit(), and urlCheckRequest().
◆ getLastStr()
|
inherited |
Definition at line 1180 of file HttpHeader.cc.
References Http::any_registered_header(), assert, HttpHeader::findLastEntry(), Http::ftStr, Http::HeaderLookupTable, httpHeaderNoteParsedEntry(), HttpHeaderEntry::id, String::termedBuf(), and HttpHeaderEntry::value.
◆ getList() [1/2]
|
inherited |
Definition at line 789 of file HttpHeader.cc.
References assert, CBIT_TEST, debugs, HttpHeader::getEntry(), Http::HeaderLookupTable, HttpHeaderInitPos, HttpHeaderEntry::id, HttpHeader::mask, String::size(), strListAdd(), String::termedBuf(), and HttpHeaderEntry::value.
Referenced by HttpHeader::addVia(), HttpStateData::blockSwitchingProtocols(), HttpStateData::buildRequestPrefix(), ESIVarState::buildVary(), ClientRequestContext::clientAccessCheck(), clientInterpretRequestHeaders(), ESIVariableLanguage::eval(), Ssl::ErrorDetailsManager::findDetail(), HttpStateData::forwardUpgrade(), HttpHeader::getCc(), HttpHeader::getSc(), HttpHeader::getStrOrList(), StoreEntry::hasIfMatchEtag(), StoreEntry::hasIfNoneMatchEtag(), HttpStateData::httpBuildRequestHeader(), httpHeaderHasConnDir(), httpMakeVaryMark(), Auth::SchemeConfig::isCP1251EncodingAllowed(), TemplateFile::loadFor(), Http::One::Server::processParsedRequest(), HttpHeader::removeConnectionHeaderEntries(), and Http::One::Server::writeControlMsgAndCall().
◆ getList() [2/2]
|
inherited |
Definition at line 759 of file HttpHeader.cc.
References assert, CBIT_TEST, debugs, HttpHeader::entries, Http::HeaderLookupTable, HttpHeader::mask, String::size(), strListAdd(), and String::termedBuf().
◆ getListMember()
|
inherited |
searches for the first matching key=value pair within the field
- Returns
- the value of the found pair or an empty string
Definition at line 929 of file HttpHeader.cc.
References Http::any_registered_header(), assert, getListMember(), and HttpHeader::getStrOrList().
Referenced by ESIVariableCookie::eval().
◆ getRange()
|
inherited |
Definition at line 1221 of file HttpHeader.cc.
References HttpHeader::findEntry(), httpHeaderNoteParsedEntry(), HttpHeaderEntry::id, HttpHdrRange::ParseCreate(), Http::RANGE, Http::REQUEST_RANGE, and HttpHeaderEntry::value.
Referenced by clientInterpretRequestHeaders(), and HttpRequest::hdrCacheInit().
◆ getSc()
|
inherited |
Definition at line 1240 of file HttpHeader.cc.
References CBIT_TEST, HttpHeader::getList(), httpHdrScParseCreate(), httpHeaderNoteParsedEntry(), HttpHeaderStats, HttpHeader::mask, HttpHeader::owner, sc, and Http::SURROGATE_CONTROL.
Referenced by HttpReply::hdrCacheInit().
◆ getStr()
|
inherited |
Definition at line 1164 of file HttpHeader.cc.
References Http::any_registered_header(), assert, HttpHeader::findEntry(), Http::ftStr, Http::HeaderLookupTable, httpHeaderNoteParsedEntry(), HttpHeaderEntry::id, String::termedBuf(), and HttpHeaderEntry::value.
Referenced by ESIVariableUserAgent::ESIVariableUserAgent(), Auth::UserRequest::authenticate(), clientPackRangeHdr(), ESIVariableCookie::eval(), ESIVariableHost::eval(), ESIVariableReferer::eval(), ESIVariableUserAgent::eval(), HttpHeader::getAuthToken(), HttpReply::hdrCacheInit(), ClientRequestContext::hostHeaderVerify(), ClientRequestContext::hostHeaderVerifyFailed(), Log::Format::HttpdCombined(), httpFixupAuthentication(), Ftp::PrintReply(), purgeEntriesByHeader(), HttpStateData::reusableReply(), Log::Format::SquidReferer(), Log::Format::SquidUserAgent(), CacheManager::start(), and Ftp::Server::writeErrorReply().
◆ getStrOrList()
|
inherited |
Definition at line 823 of file HttpHeader.cc.
References HttpHeader::findEntry(), HttpHeader::getList(), Http::HeaderLookupTable, and HttpHeaderEntry::value.
Referenced by HttpHeader::getByIdIfPresent(), HttpHeader::getListMember(), HttpHeader::hasListMember(), ACLHTTPHeaderData::match(), and HttpReply::validatorsMatch().
◆ getTime()
|
inherited |
Definition at line 1147 of file HttpHeader.cc.
References Http::any_registered_header(), assert, HttpHeader::findEntry(), Http::ftDate_1123, Http::HeaderLookupTable, httpHeaderNoteParsedEntry(), HttpHeaderEntry::id, Time::ParseRfc1123(), String::termedBuf(), and HttpHeaderEntry::value.
Referenced by clientInterpretRequestHeaders(), Adaptation::Icap::Options::configure(), HttpReply::hdrCacheInit(), and HttpReply::hdrExpirationTime().
◆ getTimeOrTag()
|
inherited |
Definition at line 1331 of file HttpHeader.cc.
References assert, etagParseInit(), HttpHeader::findEntry(), Http::ftDate_1123_or_ETag, Http::HeaderLookupTable, Time::ParseRfc1123(), ETag::str, TimeOrTag::tag, String::termedBuf(), TimeOrTag::time, TimeOrTag::valid, and HttpHeaderEntry::value.
Referenced by clientIfRangeMatch().
◆ has()
|
inherited |
Definition at line 938 of file HttpHeader.cc.
References Http::any_registered_header(), assert, CBIT_TEST, debugs, and HttpHeader::mask.
Referenced by ESIVariableUserAgent::ESIVariableUserAgent(), HttpStateData::blockSwitchingProtocols(), Http::One::Server::buildHttpRequest(), Http::Stream::buildRangeHeader(), clientReplyContext::buildReplyHeader(), HttpStateData::buildRequestPrefix(), HttpRequest::canHandle1xx(), HttpHeader::chunked(), ClientRequestContext::clientAccessCheck(), clientCheckPinning(), clientInterpretRequestHeaders(), clientPackRangeHdr(), HttpRequest::conditional(), copyOneHeaderFromClientsideRequestToUpstreamRequest(), ESIVariableCookie::eval(), ESIVariableHost::eval(), ESIVariableLanguage::eval(), ESIVariableReferer::eval(), ESIVariableUserAgent::eval(), HttpHeader::getByIdIfPresent(), Ftp::Server::handleRequest(), HttpStateData::haveParsedReplyHeaders(), HttpReply::hdrExpirationTime(), HttpStateData::httpBuildRequestHeader(), httpFixupAuthentication(), ACLHTTPHeaderData::match(), Ftp::PrintReply(), clientReplyContext::processConditional(), clientReplyContext::processExpired(), Http::One::Server::processParsedRequest(), HttpHeader::removeConnectionHeaderEntries(), Ftp::Relay::sendCommand(), CacheManager::start(), varyEvaluateMatch(), Ftp::Server::writeCustomReply(), Ftp::Server::writeErrorReply(), Ftp::Server::writeForwardedReply(), and Ftp::Server::writeForwardedReplyAndCall().
◆ hasByNameListMember()
|
inherited |
Definition at line 1687 of file HttpHeader.cc.
References assert, HttpHeader::getByName(), and strListGetItem().
Referenced by Adaptation::Icap::Options::configure().
◆ hasListMember()
|
inherited |
Definition at line 1663 of file HttpHeader.cc.
References Http::any_registered_header(), assert, HttpHeader::getStrOrList(), and strListGetItem().
Referenced by HttpStateData::blockSwitchingProtocols(), clientInterpretRequestHeaders(), Adaptation::Icap::Options::configure(), copyOneHeaderFromClientsideRequestToUpstreamRequest(), ESIVariableLanguage::eval(), and HttpStateData::haveParsedReplyHeaders().
◆ hasNamed() [1/2]
|
inherited |
- Deprecated:
- use SBuf method instead.
Definition at line 884 of file HttpHeader.cc.
References assert, Http::BAD_HDR, SBuf::caseCmp(), HttpHeader::getByIdIfPresent(), HttpHeader::getEntry(), Http::HeaderLookupTable, HttpHeaderInitPos, Http::HeaderTableRecord::id, HttpHeaderEntry::id, SBuf::length(), Http::HeaderLookupTable_t::lookup(), HttpHeaderEntry::name, Http::OTHER, strListAdd(), String::termedBuf(), and HttpHeaderEntry::value.
◆ hasNamed() [2/2]
returns true iff a [possibly empty] named field is there when returning true, also sets the value
parameter (if it is not nil)
Definition at line 866 of file HttpHeader.cc.
References HttpHeader::hasNamed(), SBuf::length(), and SBuf::rawContent().
Referenced by HttpHeader::getByName(), HttpHeader::hasNamed(), ACLHTTPHeaderData::match(), HttpHeader::needUpdate(), and SlowlyParseQuotedField().
◆ Isolate()
|
staticprotectedinherited |
either finds the end of headers or returns false If the end was found: *parse_start points to the first character after the header delimiter *blk_start points to the first header character (i.e. old parse_start value) *blk_end points to the first header delimiter character (CR or LF in CR?LF). If block starts where it ends, then there are no fields in the header.
Definition at line 302 of file HttpHeader.cc.
References assert, and headersEnd().
Referenced by HttpHeader::parse().
◆ needUpdate()
|
inherited |
- Returns
- whether calling update(fresh) would change our set of fields
Definition at line 245 of file HttpHeader.cc.
References HttpHeader::entries, HttpHeader::getByName(), HttpHeader::hasNamed(), and HttpHeader::skipUpdateHeader().
Referenced by HttpReply::recreateOnNotModified().
◆ packInto()
|
inherited |
Definition at line 540 of file HttpHeader.cc.
References Packable::append(), assert, Http::AUTHORIZATION, debugs, HttpHeader::findEntry(), Http::FTP_ARGUMENTS, Http::FTP_COMMAND, HttpHeader::getEntry(), HttpHeaderInitPos, HttpHeaderEntry::id, SBuf::length(), HttpHeaderEntry::name, HttpHeaderEntry::packInto(), Http::PROXY_AUTHORIZATION, and SBuf::rawContent().
Referenced by HttpStateData::buildRequestPrefix(), clientPackRangeHdr(), ErrorState::compileLegacyCode(), ErrorState::Dump(), htcpClear(), htcpQuery(), htcpTstReply(), HttpRequest::pack(), HttpReply::packHeadersUsingFastPacker(), prepareLogWithRequestDetails(), and Http::Tunneler::writeRequest().
◆ parse() [1/2]
|
inherited |
Parses headers stored in a buffer.
- Returns
- 1 and sets hdr_sz on success
- 0 when needs more data
- -1 on error
Definition at line 324 of file HttpHeader.cc.
References HttpHeader::Isolate(), and HttpHeader::parse().
◆ parse() [2/2]
|
inherited |
Definition at line 350 of file HttpHeader.cc.
References HttpHeader::addEntry(), assert, String::caseCmp(), Http::ContentLengthInterpreter::checkField(), HttpHeader::clean(), Config, HttpHeader::conflictingContentLength_, Http::CONTENT_LENGTH, DBG_IMPORTANT, debugs, HttpHeader::delById(), HttpHeader::getByIdIfPresent(), getStringPrefix(), Http::ContentLengthInterpreter::headerWideProblem, hoRequest, HttpHeaderStats, Http::ContentLengthInterpreter::needsSanitizing, SquidConfig::onoff, HttpHeader::owner, HttpHeaderEntry::parse(), Http::ContentLengthInterpreter::prohibitedAndIgnored(), HttpHeader::putInt64(), SquidConfig::relaxed_header_parser, Http::ContentLengthInterpreter::sawBad, Http::ContentLengthInterpreter::sawGood, HttpHeader::teUnsupported_, Http::TRANSFER_ENCODING, and Http::ContentLengthInterpreter::value.
Referenced by Ssl::ErrorDetailFile::parse(), HttpHeader::parse(), HtcpReplyData::parseHeader(), and HttpRequest::parseHeader().
◆ putAuth()
|
inherited |
Definition at line 1005 of file HttpHeader.cc.
References assert, httpHeaderPutStrf(), and Http::WWW_AUTHENTICATE.
Referenced by Ftp::Gateway::ftpAuthRequired(), Ftp::Gateway::loginFailed(), and CacheManager::start().
◆ putCc()
|
inherited |
Definition at line 1012 of file HttpHeader.cc.
References HttpHeader::addEntry(), MemBuf::buf, Http::CACHE_CONTROL, MemBuf::clean(), HttpHeader::delById(), MemBuf::init(), and HttpHdrCc::packInto().
Referenced by HttpStateData::httpBuildRequestHeader(), Ftp::HttpReplyWrapper(), and MimeIcon::load().
◆ putContRange()
|
inherited |
Definition at line 1027 of file HttpHeader.cc.
References HttpHeader::addEntry(), assert, MemBuf::buf, MemBuf::clean(), Http::CONTENT_RANGE, HttpHeader::delById(), httpHdrContRangePackInto(), and MemBuf::init().
Referenced by httpHeaderAddContRange().
◆ putExt()
|
inherited |
Definition at line 1076 of file HttpHeader.cc.
References HttpHeader::addEntry(), assert, debugs, and Http::OTHER.
Referenced by clientReplyContext::buildReplyHeader(), htcpTstReply(), CacheManager::PutCommonResponseHeaders(), and OptionsExtractor::visit().
◆ putInt()
|
inherited |
Definition at line 969 of file HttpHeader.cc.
References HttpHeader::addEntry(), Http::any_registered_header(), assert, Http::ftInt, Http::HeaderLookupTable, and xitoa().
Referenced by clientReplyContext::buildReplyHeader(), htcpTstReply(), and Ftp::HttpReplyWrapper().
◆ putInt64()
|
inherited |
Definition at line 978 of file HttpHeader.cc.
References HttpHeader::addEntry(), Http::any_registered_header(), assert, Http::ftInt64, Http::HeaderLookupTable, and xint64toa().
Referenced by Http::Stream::buildRangeHeader(), copyOneHeaderFromClientsideRequestToUpstreamRequest(), Ftp::HttpReplyWrapper(), HttpHeader::parse(), HttpReply::redirect(), and HttpReply::setHeaders().
◆ putRange()
|
inherited |
Definition at line 1043 of file HttpHeader.cc.
References HttpHeader::addEntry(), assert, MemBuf::buf, MemBuf::clean(), HttpHeader::delById(), MemBuf::init(), HttpHdrRange::packInto(), and Http::RANGE.
◆ putSc()
|
inherited |
Definition at line 1059 of file HttpHeader.cc.
References HttpHeader::addEntry(), assert, MemBuf::buf, MemBuf::clean(), HttpHeader::delById(), MemBuf::init(), sc, and Http::SURROGATE_CONTROL.
◆ putStr()
|
inherited |
Definition at line 996 of file HttpHeader.cc.
References HttpHeader::addEntry(), Http::any_registered_header(), assert, Http::ftStr, and Http::HeaderLookupTable.
Referenced by StoreEntry::adjustVary(), Ftp::Gateway::appendSuccessHeader(), ConnStateData::buildFakeRequest(), ErrorState::BuildHttpReply(), clientReplyContext::buildReplyHeader(), ESIVarState::buildVary(), clientPackRangeHdr(), copyOneHeaderFromClientsideRequestToUpstreamRequest(), Ftp::Relay::createHttpReply(), Adaptation::Icap::ModXact::encapsulateHead(), HttpStateData::forwardUpgrade(), Ftp::Server::handleFeatReply(), HttpStateData::httpBuildRequestHeader(), httpFixupAuthentication(), httpHeaderPutStrvf(), Ftp::HttpReplyWrapper(), peerDigestRequest(), HttpReply::redirect(), HttpReply::setHeaders(), UrnState::setUriResFromRequest(), and Http::One::Server::writeControlMsgAndCall().
◆ putTime()
|
inherited |
Definition at line 987 of file HttpHeader.cc.
References HttpHeader::addEntry(), Http::any_registered_header(), assert, Time::FormatRfc1123(), Http::ftDate_1123, and Http::HeaderLookupTable.
Referenced by clientReplyContext::buildReplyHeader(), htcpTstReply(), HttpStateData::httpBuildRequestHeader(), Ftp::HttpReplyWrapper(), HttpReply::redirect(), and HttpReply::setHeaders().
◆ refreshMask()
|
inherited |
Definition at line 723 of file HttpHeader.cc.
References CBIT_SET, debugs, HttpHeader::entries, httpHeaderMaskInit(), and HttpHeader::mask.
Referenced by clientReplyContext::buildReplyHeader(), Ftp::Server::handleFeatReply(), httpHdrMangleList(), and HttpHeader::removeConnectionHeaderEntries().
◆ removeConnectionHeaderEntries()
|
protectedinherited |
- Deprecated:
- Public access replaced by removeHopByHopEntries()
Definition at line 1728 of file HttpHeader.cc.
References Http::CONNECTION, HttpHeader::delAt(), HttpHeader::getEntry(), HttpHeader::getList(), HttpHeader::has(), HttpHeaderInitPos, HttpHeaderEntry::name, HttpHeader::refreshMask(), and strListIsMember().
Referenced by HttpHeader::removeHopByHopEntries().
◆ removeHopByHopEntries()
|
inherited |
Definition at line 1711 of file HttpHeader.cc.
References CBIT_CLR, HttpHeader::delAt(), HttpHeader::getEntry(), Http::HeaderLookupTable, HttpHeaderInitPos, HttpHeaderEntry::id, HttpHeader::mask, and HttpHeader::removeConnectionHeaderEntries().
Referenced by clientReplyContext::buildReplyHeader(), Adaptation::Icap::ModXact::encapsulateHead(), ESIInclude::prepareRequestHeaders(), and Http::One::Server::writeControlMsgAndCall().
◆ skipUpdateHeader()
|
protectedinherited |
Definition at line 259 of file HttpHeader.cc.
References Http::VARY.
Referenced by HttpHeader::needUpdate(), and HttpHeader::update().
◆ unsupportedTe()
|
inlineinherited |
Definition at line 172 of file HttpHeader.h.
References HttpHeader::teUnsupported_.
Referenced by HttpRequest::checkEntityFraming().
◆ update()
|
inherited |
replaces fields with matching names and adds fresh fields with new names assuming fresh
is a 304 reply
Definition at line 268 of file HttpHeader.cc.
References HttpHeader::addEntry(), assert, HttpHeaderEntry::clone(), debugs, HttpHeader::delById(), HttpHeader::delByName(), HttpHeader::getEntry(), Http::HeaderLookupTable, HttpHeaderInitPos, HttpHeaderEntry::id, HttpHeaderEntry::name, Http::OTHER, and HttpHeader::skipUpdateHeader().
Referenced by HttpHeader::HttpHeader(), clientBeginRequest(), HttpHeader::operator=(), ESIInclude::prepareRequestHeaders(), and HttpReply::recreateOnNotModified().
◆ updateOrAddStr()
|
inherited |
Ensures that the header has the given field, removing or replacing any same-name fields with conflicting values as needed.
Definition at line 1084 of file HttpHeader.cc.
References HttpHeader::addEntry(), Http::any_registered_header(), assert, Assure, SBuf::c_str(), CBIT_TEST, SBuf::cmp(), debugs, HttpHeader::entries, Http::ftStr, Http::HeaderLookupTable, SBuf::length(), HttpHeader::mask, SBuf::plength(), SBuf::rawContent(), and String::SizeMaxXXX().
Referenced by HttpHeader::addVia(), ErrorState::BuildHttpReply(), Http::One::Server::buildHttpRequest(), and Ftp::Server::setDataCommand().
Member Data Documentation
◆ conflictingContentLength_
|
privateinherited |
found different Content-Length fields
Definition at line 194 of file HttpHeader.h.
Referenced by HttpHeader::clean(), HttpHeader::conflictingContentLength(), HttpHeader::operator=(), and HttpHeader::parse().
◆ entries
|
inherited |
parsed fields in raw format
Definition at line 175 of file HttpHeader.h.
Referenced by HttpHeader::HttpHeader(), HttpHeader::addEntry(), HttpHeader::append(), HttpHeader::clean(), HttpHeader::compact(), HttpHeader::delAt(), HttpHeader::findEntry(), HttpHeader::findLastEntry(), HttpHeader::getEntry(), HttpHeader::getList(), HttpHeader::needUpdate(), HttpHeader::refreshMask(), and HttpHeader::updateOrAddStr().
◆ len
|
inherited |
length when packed, not counting terminating null-byte
Definition at line 178 of file HttpHeader.h.
Referenced by HttpHeader::addEntry(), HttpHeader::clean(), HttpHeader::delAt(), HttpHeader::operator=(), peerDigestRequest(), HttpReply::prefixLen(), and HttpRequest::prefixLen().
◆ mask
|
inherited |
bit set <=> entry present
Definition at line 176 of file HttpHeader.h.
Referenced by HttpHeader::HttpHeader(), HttpHeader::addEntry(), HttpHeader::clean(), HttpHeader::delById(), HttpHeader::delByName(), HttpHeader::findEntry(), HttpHeader::findLastEntry(), HttpHeader::getCc(), HttpHeader::getList(), HttpHeader::getSc(), HttpHeader::has(), HttpHeader::refreshMask(), HttpHeader::removeHopByHopEntries(), and HttpHeader::updateOrAddStr().
◆ owner
|
inherited |
request or reply
Definition at line 177 of file HttpHeader.h.
Referenced by HttpHeader::HttpHeader(), HttpHeader::clean(), HttpHeader::getCc(), HttpHeader::getSc(), HttpStateData::httpBuildRequestHeader(), HttpHeader::operator=(), and HttpHeader::parse().
◆ teUnsupported_
|
privateinherited |
unsupported encoding, unnecessary syntax characters, and/or invalid field-value found in Transfer-Encoding header
Definition at line 197 of file HttpHeader.h.
Referenced by HttpHeader::clean(), HttpHeader::operator=(), HttpHeader::parse(), and HttpHeader::unsupportedTe().
The documentation for this class was generated from the following file:
- src/ssl/ErrorDetailManager.cc