|
Squid Web Cache master
|
Go to the source code of this file.
Functions | |
| bool | httpHeaderParseOffset (const char *start, int64_t *offPtr, char **endPtr=nullptr) |
| bool | httpHeaderHasConnDir (const HttpHeader *hdr, const SBuf &directive) |
| int | httpHeaderParseInt (const char *start, int *val) |
| void | httpHeaderPutStrf (HttpHeader *hdr, Http::HdrType id, const char *fmt,...) PRINTF_FORMAT_ARG3 |
| bool httpHeaderHasConnDir | ( | const HttpHeader * | hdr, |
| const SBuf & | directive | ||
| ) |
Definition at line 62 of file HttpHeaderTools.cc.
References Http::CONNECTION, HttpHeader::getList(), Http::PROXY_CONNECTION, and strListIsMember().
Referenced by Adaptation::Icap::ModXact::parseIcapHead(), Adaptation::Icap::OptXact::parseResponse(), Http::Message::persistent(), and HttpStateData::statusIfComplete().
parses an int field, complains if something went wrong, returns true on success
Definition at line 84 of file HttpHeaderTools.cc.
References assert, debugs, and xisdigit.
Referenced by HttpHeaderEntry::getInt(), HttpHdrCc::parse(), and HttpHdrSc::parse().
| bool httpHeaderParseOffset | ( | const char * | start, |
| int64_t * | offPtr, | ||
| char ** | endPtr = nullptr |
||
| ) |
A strtoll(10) wrapper that checks for strtoll() failures and other problems. XXX: This function is not fully compatible with some HTTP syntax rules. Just like strtoll(), allows whitespace prefix, a sign, and any suffix. Requires at least one digit to be present. Sets "off" and "end" arguments if and only if no problems were found.
Definition at line 98 of file HttpHeaderTools.cc.
References debugs, and strtoll().
Referenced by Http::ContentLengthInterpreter::checkValue(), HttpHeaderEntry::getInt64(), httpHdrContRangeParseInit(), httpHdrRangeRespSpecParseInit(), and HttpHdrRangeSpec::parseInit().
| void httpHeaderPutStrf | ( | HttpHeader * | hdr, |
| Http::HdrType | id, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
Definition at line 25 of file HttpHeaderTools.cc.
References httpHeaderPutStrvf().
Referenced by ErrorState::BuildHttpReply(), Http::Stream::buildRangeHeader(), clientReplyContext::buildReplyHeader(), HttpStateData::httpBuildRequestHeader(), httpFixupAuthentication(), and HttpHeader::putAuth().