#include <http.h>


Classes | |
class | ReuseDecision |
assists in making and relaying entry caching/sharing decision More... | |
Public Types | |
typedef CbcPointer< AsyncJob > | Pointer |
typedef CbcPointer< BodyProducer > | Pointer |
typedef CbcPointer< BodyConsumer > | Pointer |
Public Member Functions | |
void * | operator new (size_t size) |
void | operator delete (void *address) |
void * | toCbdata () noexcept |
HttpStateData (FwdState *) | |
~HttpStateData () | |
virtual const Comm::ConnectionPointer & | dataConnection () const |
bool | sendRequest () |
void | processReplyHeader () |
void | processReplyBody () |
void | readReply (const CommIoCbParams &io) |
virtual void | maybeReadVirginBody () |
read response data from the network More... | |
ReuseDecision::Answers | reusableReply (ReuseDecision &decision) |
void | processSurrogateControl (HttpReply *) |
virtual void | noteMoreBodyDataAvailable (BodyPipe::Pointer) |
virtual void | noteBodyProductionEnded (BodyPipe::Pointer) |
virtual void | noteBodyProducerAborted (BodyPipe::Pointer) |
virtual bool | abortOnData (const char *reason) |
virtual HttpRequestPointer | originalRequest () |
a hack to reach HttpStateData::orignal_request More... | |
virtual void | noteAdaptationAnswer (const Adaptation::Answer &answer) |
virtual void | noteAdaptationAclCheckDone (Adaptation::ServiceGroupPointer group) |
virtual void | noteMoreBodySpaceAvailable (BodyPipe::Pointer) |
virtual void | noteBodyConsumerAborted (BodyPipe::Pointer) |
virtual void | swanSong () |
virtual bool | doneAll () const |
whether positive goal has been reached More... | |
void | serverComplete () |
bool | canBeCalled (AsyncCall &call) const |
whether we can be called More... | |
void | callStart (AsyncCall &call) |
virtual void | callEnd () |
called right after the called job method More... | |
virtual void | callException (const std::exception &e) |
called when the job throws during an async call More... | |
Static Public Member Functions | |
static void | httpBuildRequestHeader (HttpRequest *request, StoreEntry *entry, const AccessLogEntryPointer &al, HttpHeader *hdr_out, const Http::StateFlags &flags) |
static Pointer | Start (AsyncJob *job) |
starts a freshly created job (i.e., makes the job asynchronous) More... | |
Public Attributes | |
CachePeer * | _peer |
int | eof |
int | lastChunk |
Http::StateFlags | flags |
size_t | read_sz |
SBuf | inBuf |
I/O buffer for receiving server responses. More... | |
bool | ignoreCacheControl |
bool | surrogateNoStore |
String * | upgradeHeaderOut = nullptr |
Upgrade header value sent to the origin server or cache peer. More... | |
StoreEntry * | entry = nullptr |
FwdState::Pointer | fwd |
HttpRequestPointer | request |
Protected Member Functions | |
void | processReply () |
void | proceedAfter1xx () |
restores state and resumes processing after 1xx is ignored or forwarded More... | |
void | handle1xx (HttpReply *msg) |
ignore or start forwarding the 1xx response (a.k.a., control message) More... | |
void | drop1xx (const char *reason) |
virtual void | completeForwarding () |
bool | startRequestBodyFlow () |
void | handleRequestBodyProductionEnded () |
void | sendMoreRequestBody () |
bool | abortOnBadEntry (const char *abortReason) |
Entry-dependent callbacks use this check to quit if the entry went bad. More... | |
bool | blockCaching () |
whether to prevent caching of an otherwise cachable response More... | |
void | startAdaptation (const Adaptation::ServiceGroupPointer &group, HttpRequest *cause) |
Initiate an asynchronous adaptation transaction which will call us back. More... | |
void | adaptVirginReplyBody (const char *buf, ssize_t len) |
void | cleanAdaptation () |
virtual bool | doneWithAdaptation () const |
void | handleMoreAdaptedBodyAvailable () |
void | handleAdaptedBodyProductionEnded () |
void | handleAdaptedBodyProducerAborted () |
void | handleAdaptedHeader (Http::Message *msg) |
void | handleAdaptationCompleted () |
void | handleAdaptationBlocked (const Adaptation::Answer &answer) |
void | handleAdaptationAborted (bool bypassable=false) |
bool | handledEarlyAdaptationAbort () |
void | resumeBodyStorage () |
called by StoreEntry when it has more buffer space available More... | |
void | endAdaptedBodyConsumption () |
called when the entire adapted response body is consumed More... | |
const HttpReply * | virginReply () const |
HttpReply * | virginReply () |
HttpReply * | setVirginReply (HttpReply *r) |
HttpReply * | finalReply () |
HttpReply * | setFinalReply (HttpReply *r) |
void | adaptOrFinalizeReply () |
void | addVirginReplyBody (const char *buf, ssize_t len) |
void | storeReplyBody (const char *buf, ssize_t len) |
size_t | replyBodySpace (const MemBuf &readBuf, const size_t minSpace) const |
size_t | calcBufferSpaceToReserve (const size_t space, const size_t wantSpace) const |
determine how much space the buffer needs to reserve More... | |
void | adjustBodyBytesRead (const int64_t delta) |
initializes bodyBytesRead stats if needed and applies delta More... | |
CbcPointer< Initiate > | initiateAdaptation (Initiate *x) |
< starts freshly created initiate and returns a safe pointer to it More... | |
void | clearAdaptation (CbcPointer< Initiate > &x) |
clears the pointer (does not call announceInitiatorAbort) More... | |
void | announceInitiatorAbort (CbcPointer< Initiate > &x) |
inform the transaction about abnormal termination and clear the pointer More... | |
bool | initiated (const CbcPointer< AsyncJob > &job) const |
Must(initiated(initiate)) instead of Must(initiate.set()), for clarity. More... | |
void | deleteThis (const char *aReason) |
void | mustStop (const char *aReason) |
bool | done () const |
the job is destroyed in callEnd() when done() More... | |
virtual const char * | status () const |
internal cleanup; do not call directly More... | |
void | stopProducingFor (RefCount< BodyPipe > &, bool atEof) |
void | stopConsumingFrom (RefCount< BodyPipe > &) |
Protected Attributes | |
int64_t | currentOffset = 0 |
MemBuf * | responseBodyBuffer = nullptr |
BodyPipe::Pointer | requestBodySource |
AsyncCall::Pointer | requestSender |
BodyPipe::Pointer | virginBodyDestination |
CbcPointer< Adaptation::Initiate > | adaptedHeadSource |
BodyPipe::Pointer | adaptedBodySource |
bool | adaptationAccessCheckPending = false |
bool | startedAdaptation = false |
bool | receivedWholeRequestBody = false |
handleRequestBodyProductionEnded called More... | |
const char * | doneWithFwd = nullptr |
const char * | stopReason |
reason for forcing done() to be true More... | |
const char * | typeName |
kid (leaf) class name, for debugging More... | |
AsyncCall::Pointer | inCall |
the asynchronous call being handled, if any More... | |
const InstanceId< AsyncJob > | id |
job identifier More... | |
Private Types | |
enum | ConnectionStatus { INCOMPLETE_MSG, COMPLETE_PERSISTENT_MSG, COMPLETE_NONPERSISTENT_MSG } |
Private Member Functions | |
ConnectionStatus | statusIfComplete () const |
ConnectionStatus | persistentConnStatus () const |
void | keepaliveAccounting (HttpReply *) |
void | checkDateSkew (HttpReply *) |
bool | continueAfterParsingHeader () |
void | truncateVirginBody () |
virtual void | start () |
called by AsyncStart; do not call directly More... | |
virtual void | haveParsedReplyHeaders () |
called when we have final (possibly adapted) reply headers; kids extend More... | |
virtual bool | getMoreRequestBody (MemBuf &buf) |
either fill buf with available [encoded] request body bytes or return false More... | |
virtual void | closeServer () |
virtual bool | doneWithServer () const |
virtual void | abortAll (const char *reason) |
abnormal transaction termination; reason is for debugging only More... | |
virtual bool | mayReadVirginReplyBody () const |
whether we may receive more virgin response body bytes More... | |
void | abortTransaction (const char *reason) |
bool | maybeMakeSpaceAvailable (bool grow) |
virtual void | handleMoreRequestBodyAvailable () |
virtual void | handleRequestBodyProducerAborted () |
void | writeReplyBody () |
bool | decodeAndWriteReplyBody () |
bool | finishingBrokenPost () |
if broken posts are enabled for the request, try to fix and return true More... | |
bool | finishingChunkedRequest () |
if needed, write last-chunk to end the request body and return true More... | |
void | doneSendingRequestBody () |
void | requestBodyHandler (MemBuf &) |
virtual void | sentRequestBody (const CommIoCbParams &io) |
void | wroteLast (const CommIoCbParams &io) |
called after writing the very last request byte (body, last-chunk, etc) More... | |
void | sendComplete () |
successfully wrote the entire request (including body, last-chunk, etc.) More... | |
void | httpStateConnClosed (const CommCloseCbParams ¶ms) |
void | httpTimeout (const CommTimeoutCbParams ¶ms) |
mb_size_t | buildRequestPrefix (MemBuf *mb) |
void | forwardUpgrade (HttpHeader &) |
bool | peerSupportsConnectionPinning () const |
const char * | blockSwitchingProtocols (const HttpReply &) const |
void | serverComplete2 () |
void | sendBodyIsTooLargeError () |
void | maybePurgeOthers () |
Static Private Member Functions | |
static bool | decideIfWeDoRanges (HttpRequest *orig_request) |
Private Attributes | |
Comm::ConnectionPointer | serverConnection |
AsyncCall::Pointer | closeHandler |
Http1::ResponseParserPointer | hp |
Parser being used at present to parse the HTTP/ICY server response. More... | |
Http1::TeChunkedParser * | httpChunkDecoder |
int64_t | payloadSeen |
amount of message payload/body received so far. More... | |
int64_t | payloadTruncated |
positive when we read more than we wanted More... | |
bool | sawDateGoBack |
bool | completed = false |
HttpReply * | theVirginReply = nullptr |
HttpReply * | theFinalReply = nullptr |
Static Private Attributes | |
static cbdata_type | CBDATA_HttpStateData = CBDATA_UNKNOWN |
Detailed Description
Member Typedef Documentation
◆ Pointer [1/3]
|
inherited |
Definition at line 34 of file AsyncJob.h.
◆ Pointer [2/3]
|
inherited |
Definition at line 25 of file BodyPipe.h.
◆ Pointer [3/3]
|
inherited |
Definition at line 45 of file BodyPipe.h.
Member Enumeration Documentation
◆ ConnectionStatus
|
private |
Constructor & Destructor Documentation
◆ HttpStateData()
HttpStateData::HttpStateData | ( | FwdState * | theFwdState | ) |
Definition at line 87 of file http.cc.
References _peer, cbdataReference, closeHandler, comm_add_close_handler(), debugs, Client::entry, Comm::Connection::fd, flags, HttpRequest::flags, Client::fwd, Comm::Connection::getPeer(), HERE(), httpStateConnClosed(), ignoreCacheControl, JobCallback, CachePeer::no_delay, NULL, CachePeer::options, CachePeer::originserver, Http::StateFlags::peering, CachePeer::proxy_only, StoreEntry::releaseRequest(), Client::request, FwdState::serverConnection(), serverConnection, StoreEntry::setNoDelay(), RequestFlags::sslBumped, surrogateNoStore, Http::StateFlags::toOrigin, and Http::StateFlags::tunneling.
◆ ~HttpStateData()
HttpStateData::~HttpStateData | ( | ) |
Definition at line 130 of file http.cc.
References _peer, cbdataReferenceDone, debugs, HERE(), httpChunkDecoder, serverConnection, and upgradeHeaderOut.
Member Function Documentation
◆ abortAll()
|
privatevirtual |
Implements Client.
Definition at line 2652 of file http.cc.
References debugs, HERE(), AsyncJob::mustStop(), and serverConnection.
Referenced by abortTransaction().
◆ abortOnBadEntry()
|
protectedinherited |
Definition at line 238 of file Client.cc.
References Client::abortOnData(), debugs, Client::entry, HERE(), and StoreEntry::isAccepting().
Referenced by Client::handleAdaptationAborted(), Client::handleAdaptationBlocked(), Client::handleAdaptedBodyProducerAborted(), Client::handleAdaptedBodyProductionEnded(), Client::handleAdaptedHeader(), Client::handleMoreAdaptedBodyAvailable(), Client::noteAdaptationAclCheckDone(), and Client::resumeBodyStorage().
◆ abortOnData()
|
virtualinherited |
abnormal data transfer termination
- Return values
-
true the transaction will be terminated (abortAll called) false the transaction will survive
Reimplemented in Ftp::Relay.
Definition at line 291 of file Client.cc.
References Client::abortAll().
Referenced by Client::abortOnBadEntry(), Client::handleAdaptationBlocked(), Client::sendBodyIsTooLargeError(), and Client::sentRequestBody().
◆ abortTransaction()
|
inlineprivate |
Definition at line 113 of file http.h.
References abortAll().
Referenced by handleRequestBodyProducerAborted(), processReplyBody(), and readReply().
◆ adaptOrFinalizeReply()
|
protectedinherited |
Definition at line 962 of file Client.cc.
References Client::adaptationAccessCheckPending, FwdState::al, debugs, Client::fwd, HERE(), Adaptation::methodRespmod, Client::originalRequest(), Adaptation::pointPreCache, Client::setFinalReply(), Adaptation::AccessCheck::Start(), and Client::virginReply().
Referenced by processReply().
◆ adaptVirginReplyBody()
|
protectedinherited |
Definition at line 606 of file Client.cc.
References MemBuf::append(), assert, MemBuf::consume(), MemBuf::content(), MemBuf::contentSize(), data, debugs, HERE(), MemBuf::init(), len, NULL, BodyPipe::putMoreData(), Client::responseBodyBuffer, Client::startedAdaptation, and Client::virginBodyDestination.
Referenced by Client::addVirginReplyBody().
◆ addVirginReplyBody()
|
protectedinherited |
Definition at line 995 of file Client.cc.
References Client::adaptationAccessCheckPending, Client::adaptVirginReplyBody(), Client::adjustBodyBytesRead(), assert, data, len, Client::startedAdaptation, and Client::storeReplyBody().
Referenced by decodeAndWriteReplyBody(), Client::noteMoreBodySpaceAvailable(), and writeReplyBody().
◆ adjustBodyBytesRead()
|
protectedinherited |
Definition at line 980 of file Client.cc.
References HierarchyLogEntry::bodyBytesRead, HttpRequest::hier, Must, and Client::originalRequest().
Referenced by Client::addVirginReplyBody().
◆ announceInitiatorAbort()
|
protectedinherited |
Definition at line 38 of file Initiator.cc.
References CallJobHere.
Referenced by ClientHttpRequest::~ClientHttpRequest(), and Client::cleanAdaptation().
◆ blockCaching()
|
protectedinherited |
Definition at line 529 of file Client.cc.
References SquidConfig::accessList, ACLFilledChecklist::al, FwdState::al, Acl::Answer::allowed(), Config, debugs, Client::entry, ACLChecklist::fastCheck(), MemObject::freshestReply(), Client::fwd, HTTPMSGLOCK(), StoreEntry::mem(), Client::originalRequest(), ACLFilledChecklist::reply, and SquidConfig::storeMiss.
Referenced by Client::setFinalReply().
◆ blockSwitchingProtocols()
|
private |
- Return values
-
nil if the HTTP/101 (Switching Protocols) reply should be forwarded reason why an attempt to switch protocols should be stopped
Definition at line 870 of file http.cc.
References Http::CONNECTION, debugs, HttpHeader::getList(), HttpHeader::has(), HttpHeader::hasListMember(), Http::Message::header, strListGetItem(), Http::UPGRADE, and upgradeHeaderOut.
Referenced by handle1xx().
◆ buildRequestPrefix()
Definition at line 2331 of file http.cc.
References FwdState::al, MemBuf::append(), Packable::appendf(), assert, Http::AUTHORIZATION, RequestFlags::authSent, HttpHeader::clean(), RequestFlags::connectionAuth, crlf, HttpRequest::effectiveRequestUri(), Client::entry, flags, HttpRequest::flags, forwardUpgrade(), Client::fwd, HttpHeader::getList(), RefCount< C >::getRaw(), HttpHeader::has(), hoRequest, httpBuildRequestHeader(), HttpRequestMethod::image(), AnyP::ProtocolVersion::major, HttpRequest::method, AnyP::ProtocolVersion::minor, HttpHeader::packInto(), AnyP::Uri::path(), RequestFlags::pinned, AnyP::ProtocolVersion::protocol, AnyP::ProtocolType_str, Http::ProtocolVersion(), Client::request, MemBuf::size, SQUIDSBUFPH, SQUIDSBUFPRINT, Http::StateFlags::toOrigin, Http::UPGRADE, upgradeHeaderOut, and HttpRequest::url.
Referenced by sendRequest().
◆ calcBufferSpaceToReserve()
|
protectedinherited |
Definition at line 1020 of file Client.cc.
References BodyPipe::buf(), debugs, SBuf::maxSize, min(), NULL, MemBuf::potentialSpaceSize(), Client::responseBodyBuffer, and Client::virginBodyDestination.
Referenced by maybeMakeSpaceAvailable().
◆ callEnd()
|
virtualinherited |
called right after the called job method
Reimplemented in Adaptation::Icap::Xaction.
Definition at line 136 of file AsyncJob.cc.
References AsyncCall::debugLevel, debugs, AsyncCall::debugSection, AsyncJob::done(), HERE(), AsyncJob::inCall, NULL, AsyncJob::status(), AsyncJob::swanSong(), and AsyncJob::typeName.
Referenced by Adaptation::Icap::Xaction::callEnd(), and AsyncJob::deleteThis().
◆ callException()
|
virtualinherited |
Reimplemented in ClientHttpRequest, Ftp::Server, Ipc::Inquirer, Ipc::Forwarder, Adaptation::Icap::Xaction, Adaptation::Icap::ServiceRep, Adaptation::Icap::ModXact, and ConnStateData.
Definition at line 127 of file AsyncJob.cc.
References cbdataReferenceValid(), debugs, Must, AsyncJob::mustStop(), and CbdataParent::toCbdata().
Referenced by ConnStateData::callException(), Adaptation::Icap::Xaction::callException(), Ipc::Forwarder::callException(), Ipc::Inquirer::callException(), and Ftp::Server::callException().
◆ callStart()
|
inherited |
called just before the called method
Definition at line 114 of file AsyncJob.cc.
References cbdataReferenceValid(), AsyncCall::debugLevel, debugs, AsyncCall::debugSection, AsyncJob::inCall, Must, AsyncJob::status(), CbdataParent::toCbdata(), and AsyncJob::typeName.
◆ canBeCalled()
|
inherited |
Definition at line 101 of file AsyncJob.cc.
References AsyncCall::cancel(), debugs, HERE(), AsyncJob::inCall, and NULL.
◆ checkDateSkew()
|
private |
Definition at line 651 of file http.cc.
References HttpReply::date, debugs, flags, AnyP::Uri::host(), Client::request, squid_curtime, Http::StateFlags::toOrigin, and HttpRequest::url.
Referenced by processReplyHeader().
◆ cleanAdaptation()
|
protectedinherited |
Definition at line 581 of file Client.cc.
References Client::adaptationAccessCheckPending, Client::adaptedBodySource, Client::adaptedHeadSource, Adaptation::Initiator::announceInitiatorAbort(), assert, debugs, Client::doneWithAdaptation(), HERE(), NULL, BodyConsumer::stopConsumingFrom(), BodyProducer::stopProducingFor(), and Client::virginBodyDestination.
Referenced by Client::handleAdaptationCompleted(), and Client::swanSong().
◆ clearAdaptation()
|
protectedinherited |
Definition at line 32 of file Initiator.cc.
References CbcPointer< Cbc >::clear().
Referenced by ClientHttpRequest::handleAdaptedHeader(), ClientHttpRequest::noteAdaptationAnswer(), and Client::noteAdaptationAnswer().
◆ closeServer()
|
privatevirtual |
Use this to end communication with the server. The call cancels our closure handler and tells FwdState to forget about the connection.
Implements Client.
Definition at line 1733 of file http.cc.
References Comm::Connection::close(), closeHandler, comm_remove_close_handler(), debugs, Comm::Connection::fd, Client::fwd, HERE(), Comm::IsConnOpen(), NULL, serverConnection, and FwdState::unregister().
Referenced by continueAfterParsingHeader(), drop1xx(), handleMoreRequestBodyAvailable(), httpTimeout(), readReply(), and wroteLast().
◆ completeForwarding()
|
protectedvirtualinherited |
default calls fwd->complete()
Reimplemented in Ftp::Relay, and Ftp::Gateway.
Definition at line 210 of file Client.cc.
References assert, FwdState::complete(), debugs, Client::doneWithFwd, Client::fwd, HERE(), and NULL.
Referenced by Ftp::Gateway::completeForwarding(), Ftp::Relay::completeForwarding(), Client::handleAdaptationCompleted(), and Client::serverComplete2().
◆ continueAfterParsingHeader()
|
private |
- Return values
-
true if we can continue with processing the body or doing ICAP.
- Return values
-
false If we have not finished parsing the headers and may get more data. Schedules more reads to retrieve the missing data.
If we are done with parsing, check for errors
Definition at line 1354 of file http.cc.
References RequestFlags::accelerated, FwdState::al, assert, closeServer(), DBG_IMPORTANT, debugs, Http::StateFlags::do_next_read, FwdState::dontRetry(), Client::entry, eof, ERR_INVALID_RESP, ERR_NONE, ERR_TOO_BIG, ERR_ZERO_SIZE_OBJECT, error(), FwdState::fail(), flags, HttpRequest::flags, Client::fwd, Http::StateFlags::handling1xx, Http::StateFlags::headers_parsed, HERE(), inBuf, SBuf::length(), maybeReadVirginBody(), Must, AsyncJob::mustStop(), Http::ProtocolVersion(), Client::request, FwdState::request, StoreEntry::reset(), Http::scBadGateway, Http::scHeaderTooLarge, Http::scInvalidHeader, HttpRequest::url, StoreEntry::url(), and Client::virginReply().
Referenced by processReply().
◆ dataConnection()
|
virtual |
- Returns
- primary or "request data connection"
Implements Client.
Definition at line 147 of file http.cc.
References serverConnection.
◆ decideIfWeDoRanges()
|
staticprivate |
Definition at line 2301 of file http.cc.
References RequestFlags::cachable, RequestFlags::connectionAuth, debugs, HttpRequest::flags, HttpRequest::getRangeOffsetLimit(), NULL, HttpHdrRange::offsetLimitExceeded(), HttpRequest::range, and Client::request.
Referenced by httpBuildRequestHeader().
◆ decodeAndWriteReplyBody()
|
private |
Definition at line 1462 of file http.cc.
References Client::addVirginReplyBody(), assert, Http::StateFlags::chunked, MemBuf::content(), MemBuf::contentSize(), data, Http::StateFlags::do_next_read, flags, httpChunkDecoder, inBuf, MemBuf::init(), lastChunk, len, NULL, Http::One::TeChunkedParser::parse(), Http::One::Parser::remaining(), Http::One::TeChunkedParser::setPayloadBuffer(), SQUID_ENTER_THROWING_CODE, and SQUID_EXIT_THROWING_CODE.
Referenced by processReplyBody().
◆ deleteThis()
|
protectedinherited |
Definition at line 49 of file AsyncJob.cc.
References asyncCall(), AsyncJob::callEnd(), debugs, AsyncJob::inCall, JobMemFun(), Must, NULL, AsyncJob::stopReason, and AsyncJob::typeName.
Referenced by ConnStateData::connStateClosed().
◆ done()
|
protectedinherited |
Definition at line 90 of file AsyncJob.cc.
References AsyncJob::doneAll(), NULL, and AsyncJob::stopReason.
Referenced by AsyncJob::callEnd(), HappyConnOpener::checkForNewConnection(), and Downloader::downloadFinished().
◆ doneAll()
|
virtualinherited |
Reimplemented from AsyncJob.
Definition at line 197 of file Client.cc.
References AsyncJob::doneAll(), Client::doneWithAdaptation(), and Client::doneWithServer().
◆ doneSendingRequestBody()
|
privatevirtual |
Implements Client.
Definition at line 2575 of file http.cc.
References Http::StateFlags::chunked_request, debugs, Client::doneSendingRequestBody(), finishingBrokenPost(), finishingChunkedRequest(), flags, HERE(), sendComplete(), and serverConnection.
◆ doneWithAdaptation()
|
protectedvirtualinherited |
did we end ICAP communication?
Definition at line 598 of file Client.cc.
References Client::adaptationAccessCheckPending, Client::adaptedBodySource, Client::adaptedHeadSource, and Client::virginBodyDestination.
Referenced by Client::cleanAdaptation(), Client::doneAll(), Client::handleAdaptedHeader(), Client::noteBodyConsumerAborted(), and Client::serverComplete2().
◆ doneWithServer()
|
privatevirtual |
did we end communication?
Implements Client.
Definition at line 1746 of file http.cc.
References Comm::IsConnOpen(), and serverConnection.
Referenced by mayReadVirginReplyBody().
◆ drop1xx()
|
protected |
if possible, safely ignores the received 1xx control message otherwise, terminates the server connection
Definition at line 852 of file http.cc.
References FwdState::al, closeServer(), debugs, ERR_INVALID_RESP, FwdState::fail(), flags, Client::fwd, RefCount< C >::getRaw(), AsyncJob::mustStop(), proceedAfter1xx(), Client::request, Http::scBadGateway, and Http::StateFlags::serverSwitchedProtocols.
Referenced by handle1xx().
◆ endAdaptedBodyConsumption()
|
protectedinherited |
Definition at line 803 of file Client.cc.
References Client::adaptedBodySource, Client::handleAdaptationCompleted(), and BodyConsumer::stopConsumingFrom().
Referenced by Client::handleAdaptedBodyProductionEnded(), and Client::resumeBodyStorage().
◆ finalReply()
|
protectedinherited |
Definition at line 130 of file Client.cc.
References assert, and Client::theFinalReply.
Referenced by haveParsedReplyHeaders(), and reusableReply().
◆ finishingBrokenPost()
|
private |
Definition at line 2523 of file http.cc.
References SquidConfig::accessList, ACLFilledChecklist::al, FwdState::al, Acl::Answer::allowed(), assert, SquidConfig::brokenPosts, closeHandler, Config, debugs, ACLChecklist::fastCheck(), Client::fwd, HERE(), Comm::IsConnOpen(), JobCallback, NULL, Client::originalRequest(), Client::requestSender, serverConnection, ACLFilledChecklist::syncAle(), Comm::Write(), and wroteLast().
Referenced by doneSendingRequestBody().
◆ finishingChunkedRequest()
|
private |
Definition at line 2558 of file http.cc.
References debugs, flags, HERE(), JobCallback, Must, NULL, Client::receivedWholeRequestBody, Client::requestSender, Http::StateFlags::sentLastChunk, serverConnection, Comm::Write(), and wroteLast().
Referenced by doneSendingRequestBody().
◆ forwardUpgrade()
|
private |
copies from-client Upgrade info into the given to-server header while honoring configuration filters and following HTTP requirements
Definition at line 2049 of file http.cc.
References acl_access, ACLFilledChecklist::al, FwdState::al, ACLChecklist::changeAcl(), Config, Http::CONNECTION, debugs, ACLChecklist::fastCheck(), flags, HttpUpgradeProtocolAccess::forApplicable(), Http::StateFlags::forceClose, Client::fwd, HttpHeader::getList(), RefCount< C >::getRaw(), Http::Message::header, SquidConfig::http_upgrade_request_protocols, Http::Message::http_ver, Http::StateFlags::keepalive, Http::ProtocolVersion(), HttpHeader::putStr(), Client::request, String::size(), strListAdd(), strListGetItem(), String::termedBuf(), and Http::UPGRADE.
Referenced by buildRequestPrefix().
◆ getMoreRequestBody()
|
privatevirtual |
Reimplemented from Client.
Definition at line 2462 of file http.cc.
References buf, Http::StateFlags::chunked_request, MemBuf::content(), MemBuf::contentSize(), flags, BodyPipe::getMoreData(), Client::getMoreRequestBody(), MemBuf::max_capacity, Must, NULL, Client::receivedWholeRequestBody, Client::requestBodySource, and Http::StateFlags::sentLastChunk.
◆ handle1xx()
|
protected |
Definition at line 793 of file http.cc.
References SquidConfig::accessList, ACLFilledChecklist::al, FwdState::al, Acl::Answer::allowed(), blockSwitchingProtocols(), CallJobHere1, HttpRequest::canHandle1xx(), HttpRequest::clientConnectionManager, Config, debugs, drop1xx(), ACLChecklist::fastCheck(), flags, HttpRequest::forcedBodyContinuation, Client::fwd, Http::StateFlags::handling1xx, HERE(), HTTPMSGLOCK(), JobCallback, Must, Client::originalRequest(), proceedAfter1xx(), AccessLogEntry::reply, ACLFilledChecklist::reply, SquidConfig::reply, Client::request, Http::scContinue, Http::scSwitchingProtocols, ConnStateData::sendControlMsg(), Http::StateFlags::serverSwitchedProtocols, HttpReply::sline, Http::StatusLine::status(), and ACLFilledChecklist::syncAle().
Referenced by processReplyHeader().
◆ handleAdaptationAborted()
|
protectedinherited |
Definition at line 851 of file Client.cc.
References Client::abortAll(), Client::abortOnBadEntry(), debugs, Client::entry, Client::handledEarlyAdaptationAbort(), HERE(), and StoreEntry::isEmpty().
Referenced by Client::noteAdaptationAnswer().
◆ handleAdaptationBlocked()
|
protectedinherited |
Definition at line 890 of file Client.cc.
References Client::abortAll(), Client::abortOnBadEntry(), Client::abortOnData(), aclGetDenyInfoPage(), FwdState::al, Config, debugs, SquidConfig::denyInfoList, HttpRequest::detailError(), FwdState::dontRetry(), Client::entry, ERR_ACCESS_DENIED, ERR_ICAP_FAILURE, ERR_NONE, FwdState::fail(), Client::fwd, RefCount< C >::getRaw(), HERE(), StoreEntry::isEmpty(), MakeNamedErrorDetail(), Client::request, Adaptation::Answer::ruleId, Http::scForbidden, and String::termedBuf().
Referenced by Client::noteAdaptationAnswer().
◆ handleAdaptationCompleted()
|
protectedinherited |
Definition at line 832 of file Client.cc.
References Client::cleanAdaptation(), Client::closeServer(), Client::completeForwarding(), debugs, HERE(), and Client::mayReadVirginReplyBody().
Referenced by Client::endAdaptedBodyConsumption(), Client::handleAdaptedBodyProducerAborted(), Client::handleAdaptedHeader(), and Client::noteBodyConsumerAborted().
◆ handleAdaptedBodyProducerAborted()
|
protectedinherited |
Definition at line 810 of file Client.cc.
References Client::abortOnBadEntry(), Client::adaptedBodySource, debugs, Client::entry, BodyPipe::exhausted(), Client::handleAdaptationCompleted(), Client::handledEarlyAdaptationAbort(), StoreEntry::lengthWentBad(), Must, and BodyConsumer::stopConsumingFrom().
Referenced by Client::noteBodyProducerAborted().
◆ handleAdaptedBodyProductionEnded()
|
protectedinherited |
Definition at line 791 of file Client.cc.
References Client::abortOnBadEntry(), Client::adaptedBodySource, Client::endAdaptedBodyConsumption(), BodyPipe::exhausted(), and NULL.
Referenced by Client::noteBodyProductionEnded().
◆ handleAdaptedHeader()
|
protectedinherited |
Definition at line 694 of file Client.cc.
References Client::abortOnBadEntry(), Client::adaptedBodySource, assert, Http::Message::body_pipe, debugs, Client::doneWithAdaptation(), BodyPipe::expectNoConsumption(), Client::handleAdaptationCompleted(), HERE(), NULL, BodyPipe::setConsumerIfNotLate(), and Client::setFinalReply().
Referenced by Client::noteAdaptationAnswer().
◆ handledEarlyAdaptationAbort()
|
protectedinherited |
If the store entry is still empty, fully handles adaptation abort, returning true. Otherwise just updates the request error detail and returns false.
Definition at line 867 of file Client.cc.
References Client::abortAll(), FwdState::al, debugs, HttpRequest::detailError(), FwdState::dontRetry(), Client::entry, ERR_ICAP_FAILURE, FwdState::fail(), Client::fwd, RefCount< C >::getRaw(), StoreEntry::isEmpty(), MakeNamedErrorDetail(), Client::request, and Http::scInternalServerError.
Referenced by Client::handleAdaptationAborted(), and Client::handleAdaptedBodyProducerAborted().
◆ handleMoreAdaptedBodyAvailable()
|
protectedinherited |
Definition at line 744 of file Client.cc.
References Client::abortOnBadEntry(), Client::adaptedBodySource, assert, asyncCall(), BodyPipeCheckout::buf, BodyPipe::buf(), StoreEntry::bytesWanted(), BodyPipeCheckout::checkIn(), MemBuf::consume(), BodyPipe::consumedSize(), MemBuf::contentSize(), Client::currentOffset, debugs, StoreEntry::deferProducer(), Client::entry, HERE(), StoreIOBuffer::length, Client::resumeBodyStorage(), and StoreEntry::write().
Referenced by Client::noteMoreBodyDataAvailable(), and Client::resumeBodyStorage().
◆ handleMoreRequestBodyAvailable()
|
privatevirtual |
Definition at line 2591 of file http.cc.
References Http::StateFlags::abuse_detected, assert, BodyPipe::buf(), HttpRequest::client_addr, closeServer(), DBG_IMPORTANT, debugs, Client::entry, eof, flags, MemBuf::hasContent(), Http::StateFlags::headers_parsed, HERE(), Comm::IsConnOpen(), AsyncJob::mustStop(), NULL, Client::request, Client::requestBodySource, Http::scInvalidHeader, serverConnection, StoreEntry::url(), and Client::virginReply().
◆ handleRequestBodyProducerAborted()
|
privatevirtual |
Implements Client.
Definition at line 2623 of file http.cc.
References abortTransaction(), FwdState::al, debugs, Client::entry, ERR_ICAP_FAILURE, FwdState::fail(), Client::fwd, Client::handleRequestBodyProducerAborted(), StoreEntry::isEmpty(), MakeNamedErrorDetail(), FwdState::request, Http::scInternalServerError, and serverConnection.
◆ handleRequestBodyProductionEnded()
|
protectedinherited |
Definition at line 309 of file Client.cc.
References debugs, Client::doneSendingRequestBody(), HERE(), Client::receivedWholeRequestBody, and Client::requestSender.
Referenced by Client::noteBodyProductionEnded().
◆ haveParsedReplyHeaders()
|
privatevirtual |
called when got final headers
Reimplemented from Client.
Definition at line 984 of file http.cc.
References assert, Http::Message::cache_control, HttpStateData::ReuseDecision::cacheNegatively, StoreEntry::cacheNegatively(), HttpStateData::ReuseDecision::cachePositively, ctx_enter(), ctx_exit(), debugs, HttpStateData::ReuseDecision::doNotCacheButShare, EBIT_SET, Client::entry, ENTRY_FWD_HDR_WAIT, ENTRY_REVALIDATE_ALWAYS, ENTRY_REVALIDATE_STALE, Client::finalReply(), findPreviouslyCachedEntry(), StoreEntry::flags, Client::fwd, RefCount< C >::getRaw(), HttpHeader::has(), HttpHeader::hasListMember(), HttpHdrCc::hasMustRevalidate(), HttpHdrCc::hasNoCacheWithoutParameters(), HttpHdrCc::hasPrivate(), HttpHdrCc::hasProxyRevalidate(), HttpHdrCc::hasSMaxAge(), Client::haveParsedReplyHeaders(), Http::HDR_X_ACCELERATOR_VARY, Http::Message::header, httpMakeVaryMark(), httpMaybeRemovePublic(), ignoreCacheControl, SBuf::isEmpty(), HttpStateData::ReuseDecision::make(), StoreEntry::makePrivate(), StoreEntry::makePublic(), StoreEntry::mem_obj, HttpRequest::method, neighbors_do_private_keys, HttpReply::olderThan(), Http::PRAGMA, FwdState::reforwardableStatus(), Client::request, reusableReply(), HttpStateData::ReuseDecision::reuseNot, sawDateGoBack, HttpReply::sline, Http::StatusLine::status(), StoreEntry::timestampsSet(), MemObject::urlXXX(), Http::VARY, and MemObject::vary_headers.
◆ httpBuildRequestHeader()
|
static |
- Precondition
- Handle X-Forwarded-For
If set to ON - append client IP or 'unknown'.
If set to OFF - append 'unknown'.
If set to TRANSPARENT - pass through unchanged.
If set to TRUNCATE - drop existing list and replace with client IP or 'unknown'.
If set to DELETE - do not copy through.
Definition at line 1866 of file http.cc.
References SquidConfig::Accel, RequestFlags::accelerated, HttpHeader::addEntry(), HttpHeader::addVia(), assert, AnyP::Uri::authority(), Http::AUTHORIZATION, base64_encode_final(), base64_encode_init(), base64_encode_len, base64_encode_update(), BBUF_SZ, SBuf::c_str(), RequestFlags::cachable, String::canGrowBy(), CC_NO_CACHE, Http::StateFlags::chunked_request, String::clean(), HttpRequest::client_addr, Config, Http::CONNECTION, copyOneHeaderFromClientsideRequestToUpstreamRequest(), DBG_IMPORTANT, debugs, decideIfWeDoRanges(), EBIT_SET, HttpRequest::effectiveRequestUri(), Client::entry, HttpRequest::etag, flags, HttpRequest::flags, Http::FRONT_END_HTTPS, Http::StateFlags::front_end_https, HttpHeader::getCc(), HttpHeader::getEntry(), HttpHeader::getList(), getMaxAge(), AnyP::Uri::getScheme(), HttpHeader::has(), HttpHdrCc::hasMaxAge(), HttpHdrCc::hasNoCache(), Http::Message::header, hoRequest, Http::HOST, Http::Message::http_ver, httpFixupAuthentication(), httpHdrMangleList(), HttpHeaderInitPos, httpHeaderPutStrf(), Http::IF_MODIFIED_SINCE, Http::IF_NONE_MATCH, HttpRequest::ignoreRange(), Ip::Address::isNoAddr(), RequestFlags::isRanged, Http::StateFlags::keepalive, HttpRequest::lastmod, LOCAL_ARRAY, HttpHdrCc::mask, MAX_IPSTRLEN, MAX_URL, HttpHdrCc::maxAge(), HttpRequest::multipartRangeRequest(), NULL, Http::StateFlags::only_if_cached, HttpHdrCc::onlyIfCached(), opt_forwarded_for, HttpHeader::owner, HttpRequest::peer_domain, AnyP::PROTO_HTTPS, HttpHeader::putCc(), HttpHeader::putStr(), HttpHeader::putTime(), Client::request, ROR_REQUEST, String::size(), strListAdd(), Http::SURROGATE_CAPABILITY, SquidConfig::surrogate_id, String::termedBuf(), Http::StateFlags::toOrigin, Ip::Address::toStr(), Http::TRANSFER_ENCODING, HttpRequest::url, StoreEntry::url(), AnyP::Uri::userInfo(), and Http::X_FORWARDED_FOR.
Referenced by buildRequestPrefix(), htcpClear(), htcpQuery(), and Http::Tunneler::writeRequest().
◆ httpStateConnClosed()
|
private |
Definition at line 153 of file http.cc.
References CommCommonCbParams::data, debugs, Client::doneWithFwd, CommCommonCbParams::fd, and AsyncJob::mustStop().
Referenced by HttpStateData().
◆ httpTimeout()
|
private |
Definition at line 161 of file http.cc.
References FwdState::al, closeServer(), debugs, Client::entry, ERR_READ_TIMEOUT, FwdState::fail(), Client::fwd, AsyncJob::mustStop(), FwdState::request, Http::scGatewayTimeout, serverConnection, STORE_PENDING, StoreEntry::store_status, and StoreEntry::url().
Referenced by sendComplete(), and sendRequest().
◆ initiateAdaptation()
|
protectedinherited |
Definition at line 23 of file Initiator.cc.
References Adaptation::Initiate::initiator(), and Ident::Start().
Referenced by ClientHttpRequest::startAdaptation(), and Client::startAdaptation().
◆ initiated()
|
inlineprotectedinherited |
Definition at line 52 of file Initiator.h.
References CbcPointer< Cbc >::set().
Referenced by ClientHttpRequest::startAdaptation(), and Client::startAdaptation().
◆ keepaliveAccounting()
|
private |
Definition at line 631 of file http.cc.
References _peer, HttpReply::bodySize(), Http::StateFlags::chunked, Config, DBG_IMPORTANT, debugs, SquidConfig::detect_broken_server_pconns, Client::entry, flags, HttpReply::keep_alive, Http::StateFlags::keepalive, Http::StateFlags::keepalive_broken, HttpRequest::method, CachePeer::n_keepalives_recv, CachePeer::n_keepalives_sent, SquidConfig::onoff, Http::StateFlags::peering, Client::request, CachePeer::stats, Http::StateFlags::tunneling, and StoreEntry::url().
Referenced by processReplyHeader().
◆ maybeMakeSpaceAvailable()
|
private |
determine if read buffer can have space made available for a read.
- Parameters
-
grow whether to actually expand the buffer
- Returns
- whether the buffer can be grown to provide space regardless of whether the grow actually happened.
Definition at line 1640 of file http.cc.
References Client::calcBufferSpaceToReserve(), Config, DBG_DATA, debugs, Http::StateFlags::do_next_read, flags, Http::StateFlags::headers_parsed, inBuf, SBuf::length(), SquidConfig::maxReplyHeaderSize, processReply(), SquidConfig::readAheadGap, SBuf::reserveSpace(), serverConnection, and SBuf::spaceSize().
Referenced by maybeReadVirginBody(), and readReply().
◆ maybePurgeOthers()
|
privateinherited |
Definition at line 496 of file Client.cc.
References SBuf::c_str(), Http::CONTENT_LOCATION, debugs, HttpRequest::effectiveRequestUri(), RefCount< C >::getRaw(), Http::LOCATION, HttpRequest::method, purgeEntriesByHeader(), purgeEntriesByUrl(), HttpRequestMethod::purgesOthers(), Client::request, HttpReply::sline, Http::StatusLine::status(), and Client::theFinalReply.
Referenced by Client::haveParsedReplyHeaders().
◆ maybeReadVirginBody()
|
virtual |
Implements Client.
Definition at line 1614 of file http.cc.
References assert, Http::StateFlags::do_next_read, Comm::Connection::fd, fd_table, flags, Comm::IsConnOpen(), JobCallback, maybeMakeSpaceAvailable(), Comm::MonitorsRead(), Comm::Read(), readReply(), and serverConnection.
Referenced by continueAfterParsingHeader(), processReplyBody(), readDelayed(), readReply(), and sendRequest().
◆ mayReadVirginReplyBody()
|
privatevirtual |
◆ mustStop()
|
protectedinherited |
Definition at line 69 of file AsyncJob.cc.
References debugs, AsyncJob::inCall, Must, NULL, AsyncJob::stopReason, and AsyncJob::typeName.
Referenced by abortAll(), AsyncJob::callException(), continueAfterParsingHeader(), drop1xx(), handleMoreRequestBodyAvailable(), httpStateConnClosed(), httpTimeout(), Comm::ConnOpener::noteAbort(), proceedAfter1xx(), ConnStateData::proxyProtocolError(), readReply(), start(), and wroteLast().
◆ noteAdaptationAclCheckDone()
|
virtualinherited |
AccessCheck calls this back with a possibly nil service group to signal whether adaptation is needed and where it should start.
Reimplemented from Adaptation::Initiator.
Definition at line 923 of file Client.cc.
References Client::abortOnBadEntry(), Client::adaptationAccessCheckPending, debugs, HERE(), Client::originalRequest(), Client::processReplyBody(), Client::request, Client::sendBodyIsTooLargeError(), Client::setFinalReply(), Client::startAdaptation(), and Client::virginReply().
◆ noteAdaptationAnswer()
|
virtualinherited |
called with the initial adaptation decision (adapt, block, error); virgin and/or adapted body transmission may continue after this
Implements Adaptation::Initiator.
Definition at line 674 of file Client.cc.
References Client::adaptedHeadSource, Adaptation::Answer::akBlock, Adaptation::Answer::akError, Adaptation::Answer::akForward, Adaptation::Initiator::clearAdaptation(), Adaptation::Answer::final, RefCount< C >::getRaw(), Client::handleAdaptationAborted(), Client::handleAdaptationBlocked(), Client::handleAdaptedHeader(), Adaptation::Answer::kind, and Adaptation::Answer::message.
◆ noteBodyConsumerAborted()
|
virtualinherited |
Implements BodyProducer.
Definition at line 662 of file Client.cc.
References Client::doneWithAdaptation(), Client::handleAdaptationCompleted(), BodyProducer::stopProducingFor(), and Client::virginBodyDestination.
◆ noteBodyProducerAborted()
|
virtualinherited |
Implements BodyConsumer.
Definition at line 278 of file Client.cc.
References Client::adaptedBodySource, Client::handleAdaptedBodyProducerAborted(), Client::handleRequestBodyProducerAborted(), and Client::requestBodySource.
◆ noteBodyProductionEnded()
|
virtualinherited |
Implements BodyConsumer.
Definition at line 264 of file Client.cc.
References Client::adaptedBodySource, Client::handleAdaptedBodyProductionEnded(), Client::handleRequestBodyProductionEnded(), and Client::requestBodySource.
◆ noteMoreBodyDataAvailable()
|
virtualinherited |
Implements BodyConsumer.
Definition at line 250 of file Client.cc.
References Client::adaptedBodySource, Client::handleMoreAdaptedBodyAvailable(), Client::handleMoreRequestBodyAvailable(), and Client::requestBodySource.
◆ noteMoreBodySpaceAvailable()
|
virtualinherited |
Implements BodyProducer.
Definition at line 648 of file Client.cc.
References Client::addVirginReplyBody(), Client::completed, Client::maybeReadVirginBody(), NULL, Client::responseBodyBuffer, and Client::serverComplete2().
◆ operator delete()
◆ operator new()
◆ originalRequest()
|
virtualinherited |
Definition at line 547 of file Client.cc.
References Client::request.
Referenced by Client::adaptOrFinalizeReply(), Client::adjustBodyBytesRead(), Client::blockCaching(), finishingBrokenPost(), handle1xx(), Client::noteAdaptationAclCheckDone(), Client::serverComplete(), and Client::startRequestBodyFlow().
◆ peerSupportsConnectionPinning()
|
private |
returns true if the peer can support connection pinning
Definition at line 926 of file http.cc.
References _peer, CachePeer::connection_auth, Client::entry, flags, HttpRequest::flags, MemObject::freshestReply(), StoreEntry::mem(), CachePeer::options, CachePeer::originserver, RequestFlags::pinned, Http::PROXY_SUPPORT, Client::request, Http::scUnauthorized, and Http::StateFlags::tunneling.
Referenced by processReplyHeader().
◆ persistentConnStatus()
|
private |
- In chunked response we do not know the content length but we are absolutely sure about the end of response, so we are calling the statusIfComplete to decide if we can be persistent
- If the body size is known, we must wait until we've gotten all of it.
- If there is no message body or we got it all, we can be persistent
Definition at line 1168 of file http.cc.
References HttpReply::bodySize(), Http::StateFlags::chunked, COMPLETE_NONPERSISTENT_MSG, Http::Message::content_length, debugs, eof, flags, HERE(), INCOMPLETE_MSG, Comm::IsConnOpen(), lastChunk, HttpRequest::method, payloadSeen, payloadTruncated, Client::request, serverConnection, statusIfComplete(), and Client::virginReply().
Referenced by processReplyBody().
◆ proceedAfter1xx()
|
protected |
Definition at line 897 of file http.cc.
References asyncCall(), CallJobHere, HttpRequest::clientConnectionManager, closeHandler, comm_remove_close_handler(), debugs, Client::doneWithFwd, Comm::Connection::fd, flags, Client::fwd, Http::StateFlags::handling1xx, inBuf, Must, AsyncJob::mustStop(), ConnStateData::noteTakeServerConnectionControl(), payloadSeen, processReply(), Client::request, ScheduleCallHere, serverConnection, Http::StateFlags::serverSwitchedProtocols, and FwdState::unregister().
Referenced by drop1xx(), and handle1xx().
◆ processReply()
|
protected |
processes the already read and buffered response data, possibly after waiting for asynchronous 1xx control message processing
Definition at line 1324 of file http.cc.
References Client::adaptOrFinalizeReply(), continueAfterParsingHeader(), debugs, flags, Http::StateFlags::handling1xx, Http::StateFlags::headers_parsed, HERE(), Must, processReplyBody(), processReplyHeader(), PROF_start, and PROF_stop.
Referenced by maybeMakeSpaceAvailable(), proceedAfter1xx(), and readReply().
◆ processReplyBody()
|
virtual |
processReplyBody has two purposes: 1 - take the reply body data, if any, and put it into either the StoreEntry, or give it over to ICAP. 2 - see if we made it to the end of the response (persistent connections and such)
Implements Client.
Definition at line 1494 of file http.cc.
References abortTransaction(), Client::adaptationAccessCheckPending, RequestFlags::authSent, CallJobHere1, Http::StateFlags::chunked, HttpRequest::client_addr, HttpRequest::clientConnectionManager, closeHandler, comm_remove_close_handler(), commSetConnTimeout(), commUnsetConnTimeout(), COMPLETE_NONPERSISTENT_MSG, COMPLETE_PERSISTENT_MSG, Config, RequestFlags::connectionAuth, debugs, decodeAndWriteReplyBody(), Http::StateFlags::do_next_read, EBIT_TEST, Client::entry, ENTRY_ABORTED, Comm::Connection::fd, flags, HttpRequest::flags, StoreEntry::flags, Client::fwd, fwdPconnPool, Http::StateFlags::headers_parsed, HERE(), AnyP::Uri::host(), INCOMPLETE_MSG, StoreEntry::isAccepting(), Http::StateFlags::keepalive_broken, lastChunk, StoreEntry::lengthWentBad(), maybeReadVirginBody(), Store::nil, NULL, persistentConnStatus(), RequestFlags::pinned, PconnPool::push(), SquidConfig::read, Client::request, Client::serverComplete(), serverConnection, RequestFlags::spoofClientIp, SquidConfig::Timeout, FwdState::unregister(), HttpRequest::url, CbcPointer< Cbc >::valid(), and writeReplyBody().
Referenced by processReply().
◆ processReplyHeader()
void HttpStateData::processReplyHeader | ( | ) |
This creates the error page itself.. its likely that the forward ported reply header max size patch generates non http conformant error pages - in which case the errors where should be 'BAD_GATEWAY' etc
Creates a blank header. If this routine is made incremental, this will not do
Definition at line 668 of file http.cc.
References SBuf::append(), assert, checkDateSkew(), Http::StateFlags::chunked, HttpHeader::chunked(), RequestFlags::connectionAuthDisabled, ctx_enter(), ctx_exit(), debugs, Client::entry, eof, flags, HttpRequest::flags, StoreEntry::getMD5Text(), AnyP::Uri::getScheme(), handle1xx(), Http::Message::header, Http::StateFlags::headers_parsed, HttpRequest::hier, hp, httpChunkDecoder, inBuf, Http::Is1xx(), keepaliveAccounting(), SBuf::length(), AnyP::ProtocolVersion::major, StoreEntry::mem_obj, AnyP::ProtocolVersion::minor, NULL, HttpReply::parseHeader(), payloadSeen, HierarchyLogEntry::peer_reply_status, peerSupportsConnectionPinning(), processSurrogateControl(), AnyP::PROTO_HTTP, AnyP::PROTO_HTTPS, AnyP::ProtocolVersion::protocol, Http::StatusLine::protocol, Http::ProtocolVersion(), HttpReply::removeStaleWarnings(), Client::request, Http::scInvalidHeader, serverConnection, Http::StatusLine::set(), Client::setVirginReply(), HttpReply::sline, Http::Message::sources, Http::Message::srcHttp, Http::Message::srcHttps, Http::StatusLine::status(), HttpRequest::url, MemObject::urlXXX(), and Http::StatusLine::version.
Referenced by processReply().
◆ processSurrogateControl()
void HttpStateData::processSurrogateControl | ( | HttpReply * | reply | ) |
Definition at line 283 of file http.cc.
References SquidConfig::Accel, RequestFlags::accelerated, Config, HttpReply::date, Client::entry, HttpReply::expires, HttpRequest::flags, HttpHdrSc::getMergedTarget(), HttpHdrScTarget::hasMaxAge(), HttpHdrScTarget::hasNoStore(), ignoreCacheControl, StoreEntry::makePrivate(), HttpHdrScTarget::maxAge(), HttpHdrScTarget::maxStale(), HttpHdrScTarget::noStoreRemote(), SquidConfig::onoff, Client::request, HttpReply::surrogate_control, SquidConfig::surrogate_id, SquidConfig::surrogate_is_remote, surrogateNoStore, and StoreEntry::timestampsSet().
Referenced by processReplyHeader().
◆ readReply()
void HttpStateData::readReply | ( | const CommIoCbParams & | io | ) |
Definition at line 1226 of file http.cc.
References abortTransaction(), FwdState::al, StatCounters::all, assert, DelayId::bytesIn(), StoreEntry::bytesWanted(), closeServer(), CommCommonCbParams::conn, debugs, MemObject::delayRead(), Http::StateFlags::do_next_read, EBIT_TEST, Comm::ENDFILE, Client::entry, ENTRY_ABORTED, eof, Comm::ERR_CLOSING, ERR_READ_ERROR, FwdState::fail(), Comm::Connection::fd, CommCommonCbParams::flag, flags, StoreEntry::flags, Client::fwd, HttpRequest::hier, IoStats::Http, StatCounters::http, inBuf, Comm::INPROGRESS, IOStats, Comm::IsConnOpen(), SBuf::isEmpty(), maybeMakeSpaceAvailable(), maybeReadVirginBody(), StoreEntry::mem_obj, MemObject::mostBytesAllowed(), Must, AsyncJob::mustStop(), HierarchyLogEntry::notePeerRead(), NULL, Comm::OK, payloadSeen, processReply(), IoStats::read_hist, readDelayed(), Comm::ReadNow(), IoStats::reads, Client::request, FwdState::request, Http::scBadGateway, StatCounters::server, serverConnection, CommIoCbParams::size, SBuf::spaceSize(), statCounter, CommCommonCbParams::xerrno, and xstrerr().
Referenced by maybeReadVirginBody().
◆ replyBodySpace()
|
protectedinherited |
- Deprecated:
- use SBuf I/O API and calcBufferSpaceToReserve() instead
Definition at line 1055 of file Client.cc.
References BodyPipe::buf(), debugs, min(), NULL, MemBuf::potentialSpaceSize(), Client::responseBodyBuffer, MemBuf::spaceSize(), and Client::virginBodyDestination.
◆ requestBodyHandler()
|
private |
◆ resumeBodyStorage()
|
protectedinherited |
Definition at line 728 of file Client.cc.
References Client::abortOnBadEntry(), Client::adaptedBodySource, Client::endAdaptedBodyConsumption(), BodyPipe::exhausted(), Client::handleMoreAdaptedBodyAvailable(), and NULL.
Referenced by Client::handleMoreAdaptedBodyAvailable().
◆ reusableReply()
HttpStateData::ReuseDecision::Answers HttpStateData::reusableReply | ( | HttpStateData::ReuseDecision & | decision | ) |
Definition at line 321 of file http.cc.
References HttpStateData::ReuseDecision::answer, RequestFlags::auth, RequestFlags::authSent, Http::Message::cache_control, HttpStateData::ReuseDecision::cacheNegatively, HttpStateData::ReuseDecision::cachePositively, Config, Http::CONTENT_TYPE, HttpReply::date, debugs, HttpStateData::ReuseDecision::doNotCacheButShare, EBIT_TEST, Client::entry, HttpReply::expires, Client::finalReply(), HttpRequest::flags, StoreEntry::flags, HttpHeader::getStr(), HttpHdrCc::hasMustRevalidate(), HttpHdrCc::hasNoCacheWithoutParameters(), HttpHdrCc::hasNoCacheWithParameters(), HttpHdrCc::hasNoStore(), HttpHdrCc::hasPrivate(), HttpHdrCc::hasPublic(), HttpHdrCc::hasSMaxAge(), Http::Message::header, HERE(), ignoreCacheControl, HttpStateData::ReuseDecision::make(), SquidConfig::negativeTtl, NULL, REFRESH_OVERRIDE, refreshIsCachable(), RELEASE_REQUEST, Client::request, HttpStateData::ReuseDecision::reuseNot, sawDateGoBack, Http::scBadGateway, Http::scBadRequest, Http::scConflict, Http::scExpectationFailed, Http::scFailedDependency, Http::scForbidden, Http::scFound, Http::scGatewayTimeout, Http::scGone, Http::scHeaderTooLarge, Http::scInsufficientStorage, Http::scInternalServerError, Http::scInvalidHeader, Http::scLengthRequired, Http::scLocked, Http::scMethodNotAllowed, Http::scMisdirectedRequest, Http::scMovedPermanently, Http::scMultipleChoices, Http::scNoContent, Http::scNonAuthoritativeInformation, Http::scNotAcceptable, Http::scNotFound, Http::scNotImplemented, Http::scNotModified, Http::scOkay, Http::scPartialContent, Http::scPayloadTooLarge, Http::scPaymentRequired, Http::scPermanentRedirect, Http::scPreconditionFailed, Http::scProxyAuthenticationRequired, Http::scRequestedRangeNotSatisfied, Http::scRequestTimeout, Http::scSeeOther, Http::scServiceUnavailable, Http::scTemporaryRedirect, Http::scUnauthorized, Http::scUnprocessableEntity, Http::scUnsupportedMediaType, Http::scUriTooLong, Http::scUseProxy, HttpReply::sline, Http::StatusLine::status(), and surrogateNoStore.
Referenced by haveParsedReplyHeaders().
◆ sendBodyIsTooLargeError()
|
privateinherited |
Definition at line 951 of file Client.cc.
References Client::abortOnData(), FwdState::al, FwdState::dontRetry(), ERR_TOO_BIG, FwdState::fail(), Client::fwd, RefCount< C >::getRaw(), Client::request, and Http::scForbidden.
Referenced by Client::noteAdaptationAclCheckDone().
◆ sendComplete()
|
private |
Definition at line 1714 of file http.cc.
References commSetConnTimeout(), Config, flags, httpTimeout(), JobCallback, SquidConfig::read, Http::StateFlags::request_sent, serverConnection, and SquidConfig::Timeout.
Referenced by doneSendingRequestBody(), and wroteLast().
◆ sendMoreRequestBody()
|
protectedinherited |
Definition at line 392 of file Client.cc.
References assert, buf, conn, Client::dataConnection(), debugs, Client::getMoreRequestBody(), HERE(), Comm::IsConnOpen(), JobCallback, NULL, Client::requestBodySource, Client::requestSender, Client::sentRequestBody(), and Comm::Write().
Referenced by Client::handleMoreRequestBodyAvailable(), and Client::sentRequestBody().
◆ sendRequest()
bool HttpStateData::sendRequest | ( | ) |
Definition at line 2375 of file http.cc.
References _peer, CachePeer::allow_miss, assert, Http::Message::body_pipe, MemBuf::buf, buildRequestPrefix(), Http::StateFlags::chunked_request, closeHandler, commSetConnTimeout(), Config, Http::Message::content_length, debugs, Http::StateFlags::do_next_read, flags, HttpRequest::flags, CachePeer::front_end_https, Http::StateFlags::front_end_https, HERE(), CachePeer::host, httpTimeout(), MemBuf::init(), Comm::IsConnOpen(), JobCallback, Http::StateFlags::keepalive, SquidConfig::lifetime, maybeReadVirginBody(), Must, RequestFlags::mustKeepalive, CachePeer::n_keepalives_recv, CachePeer::n_keepalives_sent, neighborType(), NULL, Http::StateFlags::only_if_cached, SquidConfig::onoff, CachePeer::options, HttpRequest::peer_host, PEER_SIBLING, Http::Message::persistent(), RequestFlags::pinned, Client::request, Client::requestBodySource, Client::requestSender, sentRequestBody(), SquidConfig::server_pconns, serverConnection, RequestFlags::sslBumped, Client::startRequestBodyFlow(), CachePeer::stats, SquidConfig::Timeout, Http::StateFlags::tunneling, HttpRequest::url, Comm::Write(), and wroteLast().
Referenced by start().
◆ sentRequestBody()
|
privatevirtual |
Implements Client.
Definition at line 2643 of file http.cc.
References StatCounters::http, Client::sentRequestBody(), StatCounters::server, CommIoCbParams::size, and statCounter.
Referenced by sendRequest().
◆ serverComplete()
|
inherited |
call when no server communication is expected
Definition at line 160 of file Client.cc.
References assert, Client::closeServer(), Client::completed, debugs, Client::doneWithServer(), HERE(), HttpRequest::hier, NULL, Client::originalRequest(), Client::requestBodySource, Client::responseBodyBuffer, Client::serverComplete2(), BodyConsumer::stopConsumingFrom(), and HierarchyLogEntry::stopPeerClock().
Referenced by ftpReadQuit(), processReplyBody(), and Ftp::Relay::serverComplete().
◆ serverComplete2()
|
privateinherited |
Continuation of serverComplete
Definition at line 182 of file Client.cc.
References Client::completeForwarding(), debugs, Client::doneWithAdaptation(), HERE(), NULL, BodyProducer::stopProducingFor(), and Client::virginBodyDestination.
Referenced by Client::noteMoreBodySpaceAvailable(), and Client::serverComplete().
◆ setFinalReply()
Definition at line 137 of file Client.cc.
References FwdState::al, assert, Client::blockCaching(), debugs, EBIT_TEST, Client::entry, StoreEntry::flags, Client::fwd, Client::haveParsedReplyHeaders(), HERE(), HTTPMSGLOCK(), StoreEntry::release(), RELEASE_REQUEST, StoreEntry::replaceHttpReply(), AccessLogEntry::reply, StoreEntry::startWriting(), and Client::theFinalReply.
Referenced by Client::adaptOrFinalizeReply(), Client::handleAdaptedHeader(), and Client::noteAdaptationAclCheckDone().
◆ setVirginReply()
Definition at line 117 of file Client.cc.
References FwdState::al, assert, debugs, Client::fwd, HERE(), HTTPMSGLOCK(), AccessLogEntry::reply, and Client::theVirginReply.
Referenced by processReplyHeader().
◆ start()
|
privatevirtual |
Reimplemented from AsyncJob.
Definition at line 2503 of file http.cc.
References StatCounters::all, debugs, StatCounters::http, AsyncJob::mustStop(), sendRequest(), StatCounters::server, and statCounter.
◆ Start()
|
staticinherited |
Definition at line 23 of file AsyncJob.cc.
References CallJobHere, and AsyncJob::start().
Referenced by Ftp::Server::AcceptCtrlConnection(), Ftp::Server::checkDataConnPre(), clientListenerConnectionOpened(), Ftp::Client::connectDataChannel(), FwdState::connectStart(), Adaptation::Icap::Xaction::dnsLookupDone(), Log::TcpLogger::doConnect(), FwdState::establishTunnelThruProxy(), TunnelStateData::establishTunnelThruProxy(), Ipc::Coordinator::handleCacheMgrRequest(), PeerPoolMgr::handleOpenedConnection(), Ipc::Coordinator::handleSnmpRequest(), httpAccept(), httpsAccept(), httpStart(), idnsInitVC(), Ftp::Gateway::listenForDataChannel(), Ftp::Server::listenForDataConnection(), Adaptation::Icap::Xaction::noteCommConnected(), Log::TcpLogger::Open(), HappyConnOpener::openFreshConnection(), PeerPoolMgr::openNewConnection(), peerProbeConnect(), Mgr::FunAction::respond(), Mgr::InfoAction::respond(), FwdState::secureConnectionToPeer(), TunnelStateData::secureConnectionToPeer(), Ipc::SendMessage(), Mgr::Inquirer::sendResponse(), snmpConstructReponse(), SquidMain(), CacheManager::start(), Ident::Start(), Adaptation::AccessCheck::Start(), Rock::Rebuild::Start(), Security::PeerConnector::startCertDownloading(), TunnelStateData::startConnecting(), Ftp::StartGateway(), Ftp::StartRelay(), PeerPoolMgrsRr::syncConfig(), and Rock::SwapDir::updateHeaders().
◆ startAdaptation()
|
protectedinherited |
Definition at line 555 of file Client.cc.
References Client::adaptedHeadSource, FwdState::al, assert, Http::Message::body_pipe, debugs, HttpReply::expectingBody(), Client::fwd, HERE(), Adaptation::Initiator::initiateAdaptation(), Adaptation::Initiator::initiated(), HttpRequest::method, Must, BodyPipe::setBodySize(), size, Client::startedAdaptation, Client::virginBodyDestination, and Client::virginReply().
Referenced by Client::noteAdaptationAclCheckDone().
◆ startRequestBodyFlow()
|
protectedinherited |
Definition at line 219 of file Client.cc.
References assert, Http::Message::body_pipe, debugs, HERE(), NULL, Client::originalRequest(), Client::requestBodySource, BodyPipe::setConsumerIfNotLate(), and BodyPipe::status().
Referenced by sendRequest().
◆ status()
|
protectedvirtualinherited |
for debugging, starts with space
Reimplemented in HappyConnOpener, Security::PeerConnector, Ipc::Inquirer, Comm::TcpAcceptor, Http::Tunneler, Adaptation::Initiate, Adaptation::Icap::Xaction, Adaptation::Icap::ServiceRep, and Adaptation::Ecap::XactionRep.
Definition at line 159 of file AsyncJob.cc.
References buf, NULL, and AsyncJob::stopReason.
Referenced by AsyncJob::callEnd(), AsyncJob::callStart(), Adaptation::Initiate::status(), and Comm::TcpAcceptor::status().
◆ statusIfComplete()
|
private |
- If the reply wants to close the connection, it takes precedence
- If we sent a Connection:close request header, then this can not be a persistent connection.
- If we banned reuse, then this cannot be a persistent connection.
- If we haven't sent the whole request then this can not be a persistent connection.
- What does the reply have to say about keep-alive?
- Bug:
- XXX BUG? If the origin server (HTTP/1.0) does not send a keep-alive header, but keeps the connection open anyway, what happens? We'll return here and http.c waits for an EOF before changing store_status to STORE_OK. Combine this with ENTRY_FWD_HDR_WAIT and an error status code, and we might have to wait until the server times out the socket.
Definition at line 1117 of file http.cc.
References COMPLETE_NONPERSISTENT_MSG, COMPLETE_PERSISTENT_MSG, debugs, Client::entry, flags, Http::StateFlags::forceClose, Http::Message::header, httpHeaderHasConnDir(), HttpReply::keep_alive, Http::StateFlags::keepalive, HttpRequest::method, Client::request, Http::StateFlags::request_sent, StoreEntry::url(), and Client::virginReply().
Referenced by persistentConnStatus().
◆ stopConsumingFrom()
Definition at line 118 of file BodyPipe.cc.
References assert, BodyPipe::clearConsumer(), debugs, and NULL.
Referenced by ClientHttpRequest::~ClientHttpRequest(), Client::cleanAdaptation(), Client::doneSendingRequestBody(), Client::endAdaptedBodyConsumption(), ClientHttpRequest::endRequestSatisfaction(), Client::handleAdaptedBodyProducerAborted(), Client::handleRequestBodyProducerAborted(), BodySink::noteBodyProducerAborted(), ClientHttpRequest::noteBodyProducerAborted(), BodySink::noteBodyProductionEnded(), Client::serverComplete(), and Client::swanSong().
◆ stopProducingFor()
Definition at line 107 of file BodyPipe.cc.
References assert, BodyPipe::clearProducer(), debugs, and NULL.
Referenced by ConnStateData::~ConnStateData(), Client::cleanAdaptation(), ConnStateData::finishDechunkingRequest(), Client::noteBodyConsumerAborted(), and Client::serverComplete2().
◆ storeReplyBody()
|
protectedinherited |
Definition at line 1011 of file Client.cc.
References Client::currentOffset, data, Client::entry, len, and StoreEntry::write().
Referenced by Client::addVirginReplyBody().
◆ swanSong()
|
virtualinherited |
Reimplemented from AsyncJob.
Reimplemented in Ftp::Relay.
Definition at line 69 of file Client.cc.
References Client::adaptedBodySource, assert, Client::cleanAdaptation(), Client::closeServer(), Client::doneWithFwd, Client::doneWithServer(), Client::fwd, FwdState::handleUnregisteredServerEnd(), NULL, Client::requestBodySource, BodyConsumer::stopConsumingFrom(), AsyncJob::swanSong(), and Client::virginBodyDestination.
Referenced by Ftp::Relay::swanSong().
◆ toCbdata()
|
inlinevirtualnoexcept |
Implements CbdataParent.
◆ truncateVirginBody()
|
private |
truncate what we read if we read too much so that writeReplyBody() writes no more than what we should have read
Definition at line 1424 of file http.cc.
References assert, SBuf::chop(), Http::Message::content_length, debugs, HttpReply::expectingBody(), flags, Http::StateFlags::headers_parsed, inBuf, SBuf::length(), HttpRequest::method, payloadSeen, payloadTruncated, Client::request, and Client::virginReply().
Referenced by writeReplyBody().
◆ virginReply() [1/2]
|
protectedinherited |
Definition at line 103 of file Client.cc.
References assert, and Client::theVirginReply.
◆ virginReply() [2/2]
|
protectedinherited |
Definition at line 110 of file Client.cc.
References assert, and Client::theVirginReply.
Referenced by Client::adaptOrFinalizeReply(), continueAfterParsingHeader(), handleMoreRequestBodyAvailable(), Client::noteAdaptationAclCheckDone(), persistentConnStatus(), Client::startAdaptation(), statusIfComplete(), and truncateVirginBody().
◆ writeReplyBody()
|
private |
Call this when there is data from the origin server which should be sent to either StoreEntry, or to ICAP...
Definition at line 1452 of file http.cc.
References Client::addVirginReplyBody(), SBuf::consume(), data, inBuf, len, SBuf::length(), SBuf::rawContent(), and truncateVirginBody().
Referenced by processReplyBody().
◆ wroteLast()
|
private |
Definition at line 1677 of file http.cc.
References FwdState::al, StatCounters::all, closeServer(), debugs, Client::entry, Comm::ERR_CLOSING, ERR_WRITE_ERROR, FwdState::fail(), CommCommonCbParams::fd, fd_bytes(), FD_WRITE, CommCommonCbParams::flag, Client::fwd, HERE(), HttpRequest::hier, StatCounters::http, StoreEntry::mem_obj, AsyncJob::mustStop(), HierarchyLogEntry::notePeerWrite(), Client::request, FwdState::request, Http::scBadGateway, sendComplete(), StatCounters::server, serverConnection, CommIoCbParams::size, statCounter, and CommCommonCbParams::xerrno.
Referenced by finishingBrokenPost(), finishingChunkedRequest(), and sendRequest().
Member Data Documentation
◆ _peer
CachePeer* HttpStateData::_peer |
Definition at line 64 of file http.h.
Referenced by HttpStateData(), ~HttpStateData(), keepaliveAccounting(), peerSupportsConnectionPinning(), and sendRequest().
◆ adaptationAccessCheckPending
|
protectedinherited |
Definition at line 177 of file Client.h.
Referenced by Client::adaptOrFinalizeReply(), Client::addVirginReplyBody(), Client::cleanAdaptation(), Client::doneWithAdaptation(), Client::noteAdaptationAclCheckDone(), and processReplyBody().
◆ adaptedBodySource
|
protectedinherited |
to consume adated response body
Definition at line 175 of file Client.h.
Referenced by Client::~Client(), Client::cleanAdaptation(), Client::doneWithAdaptation(), Client::endAdaptedBodyConsumption(), Client::handleAdaptedBodyProducerAborted(), Client::handleAdaptedBodyProductionEnded(), Client::handleAdaptedHeader(), Client::handleMoreAdaptedBodyAvailable(), Client::noteBodyProducerAborted(), Client::noteBodyProductionEnded(), Client::noteMoreBodyDataAvailable(), Client::resumeBodyStorage(), and Client::swanSong().
◆ adaptedHeadSource
|
protectedinherited |
to get adapted response headers
Definition at line 174 of file Client.h.
Referenced by Client::cleanAdaptation(), Client::doneWithAdaptation(), Client::noteAdaptationAnswer(), and Client::startAdaptation().
◆ CBDATA_HttpStateData
|
staticprivate |
◆ closeHandler
|
private |
Definition at line 91 of file http.h.
Referenced by HttpStateData(), closeServer(), finishingBrokenPost(), proceedAfter1xx(), processReplyBody(), and sendRequest().
◆ completed
|
privateinherited |
serverComplete() has been called
Definition at line 86 of file Client.h.
Referenced by Client::noteMoreBodySpaceAvailable(), and Client::serverComplete().
◆ currentOffset
|
protectedinherited |
Our current offset in the StoreEntry
Definition at line 160 of file Client.h.
Referenced by Ftp::Gateway::getCurrentOffset(), Client::handleMoreAdaptedBodyAvailable(), Client::haveParsedReplyHeaders(), Ftp::Gateway::setCurrentOffset(), and Client::storeReplyBody().
◆ doneWithFwd
|
protectedinherited |
whether we should not be talking to FwdState; XXX: clear fwd instead points to a string literal which is used only for debugging
Definition at line 184 of file Client.h.
Referenced by Client::completeForwarding(), httpStateConnClosed(), proceedAfter1xx(), and Client::swanSong().
◆ entry
|
inherited |
Definition at line 164 of file Client.h.
Referenced by Client::Client(), Ftp::Gateway::Gateway(), HttpStateData(), Ftp::Relay::Relay(), Client::~Client(), Client::abortOnBadEntry(), Client::blockCaching(), buildRequestPrefix(), continueAfterParsingHeader(), ftpFail(), ftpSendReply(), ftpWriteTransferDone(), Client::handleAdaptationAborted(), Client::handleAdaptationBlocked(), Client::handleAdaptedBodyProducerAborted(), Client::handledEarlyAdaptationAbort(), Client::handleMoreAdaptedBodyAvailable(), handleMoreRequestBodyAvailable(), handleRequestBodyProducerAborted(), haveParsedReplyHeaders(), httpBuildRequestHeader(), httpTimeout(), keepaliveAccounting(), peerSupportsConnectionPinning(), processReplyBody(), processReplyHeader(), processSurrogateControl(), readReply(), reusableReply(), Client::sentRequestBody(), Client::setFinalReply(), statusIfComplete(), Client::storeReplyBody(), and wroteLast().
◆ eof
int HttpStateData::eof |
Definition at line 65 of file http.h.
Referenced by continueAfterParsingHeader(), handleMoreRequestBodyAvailable(), persistentConnStatus(), processReplyHeader(), and readReply().
◆ flags
Http::StateFlags HttpStateData::flags |
Definition at line 67 of file http.h.
Referenced by HttpStateData(), buildRequestPrefix(), checkDateSkew(), continueAfterParsingHeader(), decodeAndWriteReplyBody(), doneSendingRequestBody(), drop1xx(), finishingChunkedRequest(), forwardUpgrade(), getMoreRequestBody(), handle1xx(), handleMoreRequestBodyAvailable(), httpBuildRequestHeader(), keepaliveAccounting(), maybeMakeSpaceAvailable(), maybeReadVirginBody(), peerSupportsConnectionPinning(), persistentConnStatus(), proceedAfter1xx(), processReply(), processReplyBody(), processReplyHeader(), readDelayed(), readReply(), sendComplete(), sendRequest(), statusIfComplete(), and truncateVirginBody().
◆ fwd
|
inherited |
Definition at line 165 of file Client.h.
Referenced by Client::Client(), HttpStateData(), Client::adaptOrFinalizeReply(), Client::blockCaching(), buildRequestPrefix(), closeServer(), Client::completeForwarding(), continueAfterParsingHeader(), drop1xx(), finishingBrokenPost(), forwardUpgrade(), ftpFail(), ftpSendReply(), handle1xx(), Client::handleAdaptationBlocked(), Client::handledEarlyAdaptationAbort(), handleRequestBodyProducerAborted(), Client::handleRequestBodyProducerAborted(), haveParsedReplyHeaders(), httpTimeout(), proceedAfter1xx(), processReplyBody(), readReply(), Client::sendBodyIsTooLargeError(), Client::sentRequestBody(), Client::setFinalReply(), Client::setVirginReply(), Client::startAdaptation(), Client::swanSong(), and wroteLast().
◆ hp
|
private |
Definition at line 149 of file http.h.
Referenced by processReplyHeader().
◆ httpChunkDecoder
|
private |
Definition at line 150 of file http.h.
Referenced by ~HttpStateData(), decodeAndWriteReplyBody(), and processReplyHeader().
◆ id
|
protectedinherited |
Definition at line 72 of file AsyncJob.h.
◆ ignoreCacheControl
bool HttpStateData::ignoreCacheControl |
Definition at line 70 of file http.h.
Referenced by HttpStateData(), haveParsedReplyHeaders(), processSurrogateControl(), and reusableReply().
◆ inBuf
SBuf HttpStateData::inBuf |
Definition at line 69 of file http.h.
Referenced by continueAfterParsingHeader(), decodeAndWriteReplyBody(), maybeMakeSpaceAvailable(), proceedAfter1xx(), processReplyHeader(), readReply(), truncateVirginBody(), and writeReplyBody().
◆ inCall
|
protectedinherited |
Definition at line 71 of file AsyncJob.h.
Referenced by AsyncJob::callEnd(), AsyncJob::callStart(), AsyncJob::canBeCalled(), AsyncJob::deleteThis(), and AsyncJob::mustStop().
◆ lastChunk
int HttpStateData::lastChunk |
Definition at line 66 of file http.h.
Referenced by decodeAndWriteReplyBody(), persistentConnStatus(), and processReplyBody().
◆ payloadSeen
|
private |
Definition at line 153 of file http.h.
Referenced by persistentConnStatus(), proceedAfter1xx(), processReplyHeader(), readReply(), and truncateVirginBody().
◆ payloadTruncated
|
private |
Definition at line 155 of file http.h.
Referenced by persistentConnStatus(), and truncateVirginBody().
◆ read_sz
◆ receivedWholeRequestBody
|
protectedinherited |
Definition at line 180 of file Client.h.
Referenced by finishingChunkedRequest(), getMoreRequestBody(), Client::handleRequestBodyProductionEnded(), and Client::sentRequestBody().
◆ request
|
inherited |
Definition at line 166 of file Client.h.
Referenced by Ftp::Gateway::Gateway(), HttpStateData(), buildRequestPrefix(), checkDateSkew(), continueAfterParsingHeader(), decideIfWeDoRanges(), drop1xx(), forwardUpgrade(), ftpFail(), ftpReadType(), ftpSendPassive(), ftpSendReply(), ftpSendStor(), ftpSendType(), ftpSendUser(), ftpTrySlashHack(), handle1xx(), Client::handleAdaptationBlocked(), Client::handledEarlyAdaptationAbort(), handleMoreRequestBodyAvailable(), haveParsedReplyHeaders(), httpBuildRequestHeader(), keepaliveAccounting(), Client::maybePurgeOthers(), Client::noteAdaptationAclCheckDone(), Client::originalRequest(), peerSupportsConnectionPinning(), persistentConnStatus(), proceedAfter1xx(), processReplyBody(), processReplyHeader(), processSurrogateControl(), readReply(), reusableReply(), Client::sendBodyIsTooLargeError(), sendRequest(), Client::sentRequestBody(), statusIfComplete(), truncateVirginBody(), and wroteLast().
◆ requestBodySource
|
protectedinherited |
to consume request body
Definition at line 169 of file Client.h.
Referenced by Client::~Client(), Client::doneSendingRequestBody(), Client::getMoreRequestBody(), getMoreRequestBody(), handleMoreRequestBodyAvailable(), Client::handleRequestBodyProducerAborted(), Client::noteBodyProducerAborted(), Client::noteBodyProductionEnded(), Client::noteMoreBodyDataAvailable(), Client::sendMoreRequestBody(), sendRequest(), Client::sentRequestBody(), Client::serverComplete(), Client::startRequestBodyFlow(), and Client::swanSong().
◆ requestSender
|
protectedinherited |
set if we are expecting Comm::Write to call us back
Definition at line 170 of file Client.h.
Referenced by finishingBrokenPost(), finishingChunkedRequest(), Client::handleMoreRequestBodyAvailable(), Client::handleRequestBodyProducerAborted(), Client::handleRequestBodyProductionEnded(), Client::sendMoreRequestBody(), sendRequest(), and Client::sentRequestBody().
◆ responseBodyBuffer
|
protectedinherited |
Data temporarily buffered for ICAP
Definition at line 161 of file Client.h.
Referenced by Client::~Client(), Client::adaptVirginReplyBody(), Client::calcBufferSpaceToReserve(), Client::noteMoreBodySpaceAvailable(), Client::replyBodySpace(), and Client::serverComplete().
◆ sawDateGoBack
|
private |
Whether we received a Date header older than that of a matching cached response.
Definition at line 159 of file http.h.
Referenced by haveParsedReplyHeaders(), and reusableReply().
◆ serverConnection
|
private |
The current server connection. Maybe open, closed, or NULL. Use doneWithServer() to check if the server is available for use.
Definition at line 90 of file http.h.
Referenced by HttpStateData(), ~HttpStateData(), abortAll(), closeServer(), dataConnection(), doneSendingRequestBody(), doneWithServer(), finishingBrokenPost(), finishingChunkedRequest(), handleMoreRequestBodyAvailable(), handleRequestBodyProducerAborted(), httpTimeout(), maybeMakeSpaceAvailable(), maybeReadVirginBody(), persistentConnStatus(), proceedAfter1xx(), processReplyBody(), processReplyHeader(), readReply(), sendComplete(), sendRequest(), and wroteLast().
◆ startedAdaptation
|
protectedinherited |
Definition at line 178 of file Client.h.
Referenced by Client::adaptVirginReplyBody(), Client::addVirginReplyBody(), and Client::startAdaptation().
◆ stopReason
|
protectedinherited |
Definition at line 69 of file AsyncJob.h.
Referenced by AsyncJob::deleteThis(), AsyncJob::done(), AsyncJob::mustStop(), AsyncJob::status(), and HappyConnOpener::status().
◆ surrogateNoStore
bool HttpStateData::surrogateNoStore |
Definition at line 71 of file http.h.
Referenced by HttpStateData(), processSurrogateControl(), and reusableReply().
◆ theFinalReply
|
privateinherited |
adapted reply from ICAP or virgin reply
Definition at line 191 of file Client.h.
Referenced by Client::~Client(), Client::finalReply(), Client::haveParsedReplyHeaders(), Client::maybePurgeOthers(), and Client::setFinalReply().
◆ theVirginReply
|
privateinherited |
reply received from the origin server
Definition at line 190 of file Client.h.
Referenced by Client::~Client(), Client::setVirginReply(), and Client::virginReply().
◆ typeName
|
protectedinherited |
Definition at line 70 of file AsyncJob.h.
Referenced by AsyncJob::AsyncJob(), Adaptation::Icap::Xaction::Xaction(), AsyncJob::~AsyncJob(), AsyncJob::callEnd(), AsyncJob::callStart(), AsyncJob::deleteThis(), and AsyncJob::mustStop().
◆ upgradeHeaderOut
String* HttpStateData::upgradeHeaderOut = nullptr |
Definition at line 74 of file http.h.
Referenced by ~HttpStateData(), blockSwitchingProtocols(), and buildRequestPrefix().
◆ virginBodyDestination
|
protectedinherited |
to provide virgin response body
Definition at line 173 of file Client.h.
Referenced by Client::~Client(), Client::adaptVirginReplyBody(), Client::calcBufferSpaceToReserve(), Client::cleanAdaptation(), Client::doneWithAdaptation(), Client::noteBodyConsumerAborted(), Client::replyBodySpace(), Client::serverComplete2(), Client::startAdaptation(), and Client::swanSong().
The documentation for this class was generated from the following files: