Namespaces | |
namespace | One |
Classes | |
class | ContentLengthInterpreter |
class | HeaderLookupTable_t |
class | HeaderTableRecord |
class | Message |
common parts of HttpRequest and HttpReply More... | |
class | StateFlags |
class | StatusLine |
class | Stream |
class | Tunneler |
class | TunnelerAnswer |
Typedefs | |
typedef RefCount< Http::Message > | MessagePointer |
typedef RefCount< Http::Stream > | StreamPointer |
typedef enum Http::_method_t | MethodType |
Functions | |
std::ostream & | operator<< (std::ostream &, const TunnelerAnswer &) |
const SBuf & | MethodStr (const MethodType m) |
AnyP::ProtocolVersion | ProtocolVersion (unsigned int aMajor, unsigned int aMinor) |
HTTP version label information. More... | |
AnyP::ProtocolVersion | ProtocolVersion () |
bool | any_HdrType_enum_value (const Http::HdrType id) |
match any known header type, including OTHER and BAD More... | |
bool | any_valid_header (const Http::HdrType id) |
match any valid header type, including OTHER but not BAD More... | |
bool | any_registered_header (const Http::HdrType id) |
std::ostream & | operator<< (std::ostream &, HdrType) |
const char * | StatusCodeString (const Http::StatusCode status) |
bool | Is1xx (const int sc) |
whether this is an informational 1xx response status code More... | |
bool | Is4xx (const int sc) |
whether this is a client error 4xx response status code More... | |
bool | ProhibitsContentLength (const StatusCode sc) |
whether this response status code prohibits sending Content-Length More... | |
bool | IsReforwardableStatus (StatusCode) |
whether to send the request to another peer based on the current response status code More... | |
SBuf | SlowlyParseQuotedString (const char *description, const char *start, size_t length) |
ConnStateData * | NewServer (const MasterXactionPointer &xact) |
create a new HTTP connection handler; never returns NULL More... | |
Variables | |
const SBuf | MethodType_sb [] = {SBuf()} |
const HeaderLookupTable_t | HeaderLookupTable |
Typedef Documentation
◆ MessagePointer
typedef RefCount<Http::Message> Http::MessagePointer |
◆ MethodType
typedef enum Http::_method_t Http::MethodType |
◆ StreamPointer
typedef RefCount<Http::Stream> Http::StreamPointer |
Enumeration Type Documentation
◆ _method_t
enum Http::_method_t |
Definition at line 21 of file MethodType.h.
◆ HdrFieldType
|
strong |
possible types for http header fields
Enumerator | |
---|---|
ftInvalid | to catch nasty errors with hdr_id<->fld_type clashes |
ftInt | |
ftInt64 | |
ftStr | |
ftDate_1123 | |
ftETag | |
ftPCc | |
ftPContRange | |
ftPRange | |
ftPSc | |
ftDate_1123_or_ETag |
Definition at line 127 of file RegisteredHeaders.h.
◆ HdrKind
enum Http::HdrKind |
Enumerator | |
---|---|
None | |
ListHeader | |
RequestHeader | |
ReplyHeader | |
HopByHopHeader | |
Denied304Header | |
GeneralHeader | |
EntityHeader |
Definition at line 141 of file RegisteredHeaders.h.
◆ HdrType
enum Http::HdrType |
recognized or "known" header fields; and the RFC which defines them (or not) http://www.iana.org/assignments/message-headers/message-headers.xhtml
Definition at line 21 of file RegisteredHeaders.h.
◆ StatusCode
enum Http::StatusCode |
These basic HTTP reply status codes are defined by RFC 2616 unless otherwise stated. The IANA registry for HTTP status codes can be found at: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
Definition at line 20 of file StatusCode.h.
Function Documentation
◆ any_HdrType_enum_value()
|
inline |
Definition at line 205 of file RegisteredHeaders.h.
References enumBegin_, and enumEnd_.
Referenced by HttpHeaderEntry::HttpHeaderEntry(), HttpHeader::addEntry(), HeaderManglers::find(), and operator<<().
◆ any_registered_header()
|
inline |
match any registered header type (headers squid knows how to handle), thus excluding OTHER and BAD
Definition at line 220 of file RegisteredHeaders.h.
Referenced by HttpHeader::delById(), HttpHeader::findEntry(), HttpHeader::findLastEntry(), HttpHeader::getInt(), HttpHeader::getInt64(), HttpHeader::getLastStr(), HttpHeader::getListMember(), HttpHeader::getStr(), HttpHeader::getTime(), HttpHeader::has(), HttpHeader::hasListMember(), HttpHeader::putInt(), HttpHeader::putInt64(), HttpHeader::putStr(), HttpHeader::putTime(), and HttpHeader::updateOrAddStr().
◆ any_valid_header()
|
inline |
Definition at line 212 of file RegisteredHeaders.h.
References ACCEPT, and BAD_HDR.
Referenced by HttpHeader::clean(), and httpHeaderFieldStatDumper().
◆ Is1xx()
|
inline |
Definition at line 92 of file StatusCode.h.
References sc, scContinue, and scOkay.
Referenced by HttpStateData::processReplyHeader(), and ProhibitsContentLength().
◆ Is4xx()
|
inline |
Definition at line 94 of file StatusCode.h.
References sc, scBadRequest, and scInternalServerError.
Referenced by CachePeer::noteFailure().
◆ IsReforwardableStatus()
bool Http::IsReforwardableStatus | ( | StatusCode | s | ) |
Definition at line 281 of file StatusCode.cc.
References Config, SquidConfig::onerror, SquidConfig::retry, scBadGateway, scForbidden, scGatewayTimeout, scInternalServerError, scNotImplemented, and scServiceUnavailable.
Referenced by TunnelStateData::checkRetry(), HttpStateData::haveParsedReplyHeaders(), and FwdState::reforward().
◆ MethodStr()
|
inline |
Definition at line 100 of file MethodType.h.
References MethodType_sb.
Referenced by clientReplyContext::purgeEntry().
◆ NewServer()
ConnStateData * Http::NewServer | ( | const MasterXactionPointer & | xact | ) |
Definition at line 391 of file Http1Server.cc.
Referenced by httpAccept().
◆ operator<<() [1/2]
std::ostream & Http::operator<< | ( | std::ostream & | os, |
const TunnelerAnswer & | answer | ||
) |
Definition at line 19 of file HttpTunnelerAnswer.cc.
References Http::TunnelerAnswer::conn, CbcPointer< Cbc >::get(), Http::TunnelerAnswer::leftovers, SBuf::length(), Http::TunnelerAnswer::peerResponseStatus, scNone, and Http::TunnelerAnswer::squidError.
◆ operator<<() [2/2]
std::ostream & Http::operator<< | ( | std::ostream & | s, |
HdrType | id | ||
) |
Definition at line 64 of file RegisteredHeaders.cc.
References any_HdrType_enum_value(), HeaderLookupTable, Http::HeaderLookupTable_t::lookup(), and Http::HeaderTableRecord::name.
◆ ProhibitsContentLength()
|
inline |
Definition at line 96 of file StatusCode.h.
References Is1xx(), sc, and scNoContent.
Referenced by Http::ContentLengthInterpreter::applyStatusCodeRules(), and HttpReply::removeIrrelevantContentLength().
◆ ProtocolVersion() [1/2]
|
inline |
HTTP version label information.
Squid being conditionally compliant with RFC 7230 on both client and server connections the default value is HTTP/1.1.
Definition at line 32 of file ProtocolVersion.h.
References AnyP::PROTO_HTTP, and ProtocolVersion().
Referenced by ProtocolVersion().
◆ ProtocolVersion() [2/2]
|
inline |
Definition at line 19 of file ProtocolVersion.h.
References AnyP::PROTO_HTTP, and ProtocolVersion().
Referenced by netdbExchangeState::netdbExchangeState(), Http::One::TeChunkedParser::TeChunkedParser(), ErrorState::BuildHttpReply(), clientReplyContext::buildReplyHeader(), Downloader::buildRequest(), HttpStateData::buildRequestPrefix(), HttpRequest::canHandle1xx(), HttpRequest::checkEntityFraming(), Http::StatusLine::clean(), clientBeginRequest(), clientReplyContext::cloneReply(), HttpStateData::continueAfterParsingHeader(), HttpStateData::forwardUpgrade(), HttpReply::httpMsgParseError(), Ftp::HttpReplyWrapper(), Http::StatusLine::init(), HttpReply::make304(), HttpReply::MakeConnectionEstablished(), ConnStateData::parseHttpRequest(), Http::One::RequestParser::parseHttpVersionField(), Ftp::Server::parseOneRequest(), parsePortProtocol(), Http::One::ResponseParser::parseResponseFirstLine(), Http::Message::persistent(), Http::One::Server::processParsedRequest(), HttpStateData::processReplyHeader(), HttpReply::redirect(), HttpReply::setHeaders(), ConnStateData::splice(), and CacheManager::start().
◆ SlowlyParseQuotedString()
Parses an HTTP quoted-string sequence (RFC 9110, Section 5.6.4).
- Parameters
-
a brief human-friendly description of the string being parsed start input buffer (an opening double-quote is expected at *start) length is the number of characters in the given buffer
- Returns
- string contents with open/closing quotes stripped and any quoted-pairs decoded
Avoid this slow function on performance-sensitive code paths. TODO: Replace with an efficient, SBuf-friendly implementation.
- See also
- httpHeaderParseQuotedString() for a String-friendly function.
Definition at line 238 of file HttpHeaderTools.cc.
References Here, httpHeaderParseQuotedString(), StringToSBuf(), and ToSBuf().
Referenced by SlowlyParseQuotedField().
◆ StatusCodeString()
const char * Http::StatusCodeString | ( | const Http::StatusCode | status | ) |
Definition at line 15 of file StatusCode.cc.
References debugs, scAccepted, scAlreadyReported, scBadGateway, scBadRequest, scConflict, scContentTooLarge, scContinue, scCreated, scEarlyHints, scExpectationFailed, scFailedDependency, scForbidden, scFound, scGatewayTimeout, scGone, scHeaderTooLarge, scHttpVersionNotSupported, scImUsed, scInsufficientStorage, scInternalServerError, scInvalidHeader, scLengthRequired, scLocked, scLoopDetected, scMethodNotAllowed, scMisdirectedRequest, scMovedPermanently, scMultipleChoices, scMultiStatus, scNetworkAuthenticationRequired, scNoContent, scNonAuthoritativeInformation, scNone, scNotAcceptable, scNotExtended, scNotFound, scNotImplemented, scNotModified, scOkay, scPartialContent, scPaymentRequired, scPermanentRedirect, scPreconditionFailed, scPreconditionRequired, scProcessing, scProxyAuthenticationRequired, scRequestedRangeNotSatisfied, scRequestHeaderFieldsTooLarge, scRequestTimeout, scResetContent, scSeeOther, scServiceUnavailable, scSwitchingProtocols, scTemporaryRedirect, scTooManyRequests, scUnauthorized, scUnavailableForLegalReasons, scUnprocessableEntity, scUnsupportedMediaType, scUpgradeRequired, scUriTooLong, scUseProxy, and scVariantAlsoNegotiates.
Referenced by FwdState::fail(), Http::StatusLine::packedLength(), Http::StatusLine::packInto(), and Http::StatusLine::reason().
Variable Documentation
◆ HeaderLookupTable
const HeaderLookupTable_t Http::HeaderLookupTable |
Definition at line 60 of file RegisteredHeaders.cc.
Referenced by HttpHeaderEntry::HttpHeaderEntry(), HeaderManglers::dumpAccess(), HeaderManglers::dumpReplacement(), HttpHeader::findEntry(), HttpHeader::findLastEntry(), HttpHeader::getETag(), HttpHeader::getInt(), HttpHeader::getInt64(), HttpHeader::getLastStr(), HttpHeader::getList(), HttpHeader::getStr(), HttpHeader::getStrOrList(), HttpHeader::getTime(), HttpHeader::getTimeOrTag(), HttpHeader::hasNamed(), httpHeaderFieldStatDumper(), httpHeaderInitModule(), httpHeaderNoteParsedEntry(), httpHeaderStoreReport(), operator<<(), ACLHTTPHeaderData::parse(), HttpHeaderEntry::parse(), parse_HeaderWithAclList(), HttpHeader::putInt(), HttpHeader::putInt64(), HttpHeader::putStr(), HttpHeader::putTime(), HttpHeader::removeHopByHopEntries(), HeaderManglers::track(), HttpHeader::update(), and HttpHeader::updateOrAddStr().
◆ MethodType_sb
Definition at line 58 of file stub_libhttp.cc.
Referenced by HttpRequestMethod::image(), and MethodStr().