#include <client_side_request.h>

Inheritance diagram for ClientHttpRequest:
Collaboration diagram for ClientHttpRequest:

Classes

struct  Flags
 
struct  Out
 
struct  Redirect
 

Public Types

typedef CbcPointer< AsyncJobPointer
 
typedef CbcPointer< BodyConsumerPointer
 

Public Member Functions

 ClientHttpRequest (ConnStateData *)
 
 ClientHttpRequest (ClientHttpRequest &&)=delete
 
 ~ClientHttpRequest () override
 
String rangeBoundaryStr () const
 
void freeResources ()
 
void updateCounters ()
 
void logRequest ()
 
MemObjectmemObject () const
 
bool multipartRangeRequest () const
 
void processRequest ()
 
void httpStart ()
 
bool onlyIfCached () const
 
bool gotEnough () const
 
StoreEntrystoreEntry () const
 
void storeEntry (StoreEntry *)
 
StoreEntryloggingEntry () const
 
void loggingEntry (StoreEntry *)
 
ConnStateDatagetConn () const
 
void initRequest (HttpRequest *)
 
void resetRequest (HttpRequest *)
 
void resetRequestXXX (HttpRequest *, bool uriChanged)
 
void checkForInternalAccess ()
 Checks whether the current request is internal and adjusts it accordingly. More...
 
void updateLoggingTags (const LogTags_ot code)
 update the code in the transaction processing tags More...
 
const LogTagsloggingTags () const
 the processing tags associated with this request transaction. More...
 
int64_t mRangeCLen () const
 
void doCallouts ()
 
void setLogUriToRequestUri ()
 sets log_uri when we know the current request More...
 
void setLogUriToRawUri (const char *, const HttpRequestMethod &)
 
void setErrorUri (const char *)
 
int64_t prepPartialResponseGeneration ()
 
void calloutsError (const err_type, const ErrorDetail::Pointer &)
 Build an error reply. For use with the callouts. More...
 
void updateError (const Error &)
 if necessary, stores new error information (if any) More...
 
Ssl::BumpMode sslBumpNeed () const
 returns raw sslBump mode value More...
 
bool sslBumpNeeded () const
 returns true if and only if the request needs to be bumped More...
 
void sslBumpNeed (Ssl::BumpMode)
 set the sslBumpNeeded state More...
 
void sslBumpStart ()
 
void sslBumpEstablish (Comm::Flag)
 
void startAdaptation (const Adaptation::ServiceGroupPointer &)
 Initiate an asynchronous adaptation transaction which will call us back. More...
 
bool requestSatisfactionMode () const
 
bool doneAll () const override
 whether positive goal has been reached More...
 
void callException (const std::exception &) override
 called when the job throws during an async call More...
 
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...
 
void handleStopRequest ()
 process external request to terminate now (i.e. during this async call) More...
 
virtual void * toCbdata ()=0
 

Static Public Member Functions

static void Start (const Pointer &job)
 
static void RegisterWithCacheManager ()
 

Public Attributes

HttpRequest *const request = nullptr
 
char * uri = nullptr
 
char *const log_uri = nullptr
 
String store_id
 
struct ClientHttpRequest::Out out
 
HttpHdrRangeIter range_iter
 
size_t req_sz = 0
 raw request size on input, not current request size More...
 
const AccessLogEntry::Pointer al
 access.log entry More...
 
struct ClientHttpRequest::Flags flags
 
struct ClientHttpRequest::Redirect redirect
 
dlink_node active
 
dlink_list client_stream
 
ClientRequestContextcalloutContext = nullptr
 
const InstanceId< AsyncJobid
 job identifier More...
 

Protected Member Functions

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 void start ()
 called by AsyncStart; do not call directly More...
 
virtual void swanSong ()
 
virtual const char * status () const
 internal cleanup; do not call directly More...
 
void stopConsumingFrom (RefCount< BodyPipe > &)
 

Static Protected Member Functions

static void ReportAllJobs (StoreEntry *)
 writes a cache manager report about all jobs existing in this worker More...
 

Protected Attributes

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...
 
bool started_ = false
 Start() has finished successfully. More...
 
bool swanSang_ = false
 swanSong() was called More...
 

Private Member Functions

 CBDATA_CHILD (ClientHttpRequest)
 
void absorbLogUri (char *)
 assigns log_uri with aUri without copying the entire C-string More...
 
void clearRequest ()
 resets the current request and log_uri to nil More...
 
void assignRequest (HttpRequest *)
 
void handleAdaptationFailure (const ErrorDetail::Pointer &, bool bypassable=false)
 
void handleAdaptedHeader (Http::Message *)
 
void handleAdaptationBlock (const Adaptation::Answer &)
 
void noteAdaptationAclCheckDone (Adaptation::ServiceGroupPointer) override
 
void noteAdaptationAnswer (const Adaptation::Answer &) override
 
void noteMoreBodyDataAvailable (BodyPipe::Pointer) override
 
void noteBodyProductionEnded (BodyPipe::Pointer) override
 
void noteBodyProducerAborted (BodyPipe::Pointer) override
 
void endRequestSatisfaction ()
 
void resumeBodyStorage ()
 called by StoreEntry when it has more buffer space available More...
 
virtual void finalizedInCbdataChild ()=0
 hack: ensure CBDATA_CHILD() after a toCbdata()-defining CBDATA_INTERMEDIATE() More...
 

Private Attributes

int64_t maxReplyBodySize_ = 0
 
StoreEntryentry_ = nullptr
 
StoreEntryloggingEntry_ = nullptr
 
ConnStateDataconn_ = nullptr
 
Ssl::BumpMode sslBumpNeed_ = Ssl::bumpEnd
 whether (and how) the request needs to be bumped More...
 
CbcPointer< Adaptation::InitiatevirginHeadSource
 
BodyPipe::Pointer adaptedBodySource
 
bool receivedWholeAdaptedReply = false
 noteBodyProductionEnded() was called More...
 
bool request_satisfaction_mode = false
 
int64_t request_satisfaction_offset = 0
 

Detailed Description

Definition at line 33 of file client_side_request.h.

Member Typedef Documentation

◆ Pointer [1/2]

Definition at line 34 of file AsyncJob.h.

◆ Pointer [2/2]

Definition at line 45 of file BodyPipe.h.

Constructor & Destructor Documentation

◆ ClientHttpRequest() [1/2]

◆ ClientHttpRequest() [2/2]

ClientHttpRequest::ClientHttpRequest ( ClientHttpRequest &&  )
delete

◆ ~ClientHttpRequest()

Member Function Documentation

◆ absorbLogUri()

void ClientHttpRequest::absorbLogUri ( char *  aUri)
private

Definition at line 1908 of file client_side_request.cc.

References log_uri, and xfree.

Referenced by clearRequest(), setErrorUri(), setLogUriToRawUri(), and setLogUriToRequestUri().

◆ announceInitiatorAbort()

void Adaptation::Initiator::announceInitiatorAbort ( CbcPointer< Initiate > &  x)
protectedinherited

Definition at line 38 of file Initiator.cc.

References CallJobHere.

Referenced by ~ClientHttpRequest(), and Client::cleanAdaptation().

◆ assignRequest()

void ClientHttpRequest::assignRequest ( HttpRequest newRequest)
private

initializes the current unassigned request to the virgin request sets the current request, asserting that it was unset

Definition at line 1672 of file client_side_request.cc.

References assert, HTTPMSGLOCK(), request, and setLogUriToRequestUri().

Referenced by initRequest(), and resetRequestXXX().

◆ callEnd()

void AsyncJob::callEnd ( )
virtualinherited

◆ callException()

void ClientHttpRequest::callException ( const std::exception &  e)
overridevirtual

Reimplemented from AsyncJob.

Definition at line 2178 of file client_side_request.cc.

References DBG_IMPORTANT, debugs, getConn(), and Comm::IsConnOpen().

◆ calloutsError()

◆ callStart()

void AsyncJob::callStart ( AsyncCall call)
inherited

◆ canBeCalled()

bool AsyncJob::canBeCalled ( AsyncCall call) const
inherited

Definition at line 117 of file AsyncJob.cc.

References AsyncCall::cancel(), debugs, and AsyncJob::inCall.

◆ CBDATA_CHILD()

ClientHttpRequest::CBDATA_CHILD ( ClientHttpRequest  )
private

◆ checkForInternalAccess()

◆ clearAdaptation()

void Adaptation::Initiator::clearAdaptation ( CbcPointer< Initiate > &  x)
protectedinherited

◆ clearRequest()

void ClientHttpRequest::clearRequest ( )
private

Definition at line 1682 of file client_side_request.cc.

References absorbLogUri(), HTTPMSGUNLOCK(), and request.

Referenced by freeResources(), and resetRequestXXX().

◆ deleteThis()

void AsyncJob::deleteThis ( const char *  aReason)
protectedinherited

◆ doCallouts()

void ClientHttpRequest::doCallouts ( )

Definition at line 1723 of file client_side_request.cc.

References SquidConfig::accessList, aclFindNfMarkConfig(), aclMapTOS(), ClientRequestContext::adaptation_acl_check_done, ClientRequestContext::adapted_http_access_done, ACLFilledChecklist::al, al, assert, Ssl::bumpClientFirst, SBuf::c_str(), RequestFlags::cachable, calloutContext, cbdataReferenceDone, ClientRequestContext::checkNoCache(), HttpRequest::client_addr, client_stream, ClientRequestContext::clientAccessCheck(), ClientRequestContext::clientAccessCheck2(), clientInterpretRequestHeaders(), ClientRequestContext::clientRedirectStart(), ClientRequestContext::clientStoreIdStart(), clientStreamRead(), Config, dlink_node::data, debugs, Ip::Qos::dirAccepted, ClientRequestContext::error, errorAppendEntry(), ConnStateData::flags, HttpRequest::flags, getConn(), ClientRequestContext::host_header_verify_done, ClientRequestContext::hostHeaderVerify(), ClientRequestContext::http, ClientRequestContext::http_access_done, HttpRequest::icapHistory(), ClientRequestContext::interpreted_req_hdrs, Comm::IsConnOpen(), log_uri, loggingTags(), HttpRequest::method, Adaptation::methodReqmod, ACLFilledChecklist::my_addr, HttpRequest::my_addr, ClientRequestContext::no_cache_done, SquidConfig::noCache, Adaptation::pointPreCache, dlink_node::prev, processRequest(), SquidConfig::Program, ConnStateData::readMore, ClientRequestContext::readNextRequest, SquidConfig::redirect, ClientRequestContext::redirect_done, REDIRECT_PENDING, ClientRequestContext::redirect_state, request, Ip::Qos::setNfConnmark(), ConnStateData::setServerBump(), Ip::Qos::setSockNfmark(), Ip::Qos::setSockTos(), ACLFilledChecklist::src_addr, ClientRequestContext::sslBumpAccessCheck(), ClientRequestContext::sslBumpCheckDone, sslBumpNeed(), sslBumpNeeded(), Adaptation::AccessCheck::Start(), SquidConfig::store_id, ClientRequestContext::store_id_done, ClientRequestContext::store_id_state, storeCreateEntry(), HttpRequest::storeId(), ACLFilledChecklist::syncAle(), dlink_list::tail, Ip::Qos::TheConfig, ClientRequestContext::toClientMarkingDone, and StoreEntry::unlock().

Referenced by Downloader::buildRequest(), ClientRequestContext::checkNoCacheDone(), ClientRequestContext::clientAccessCheckDone(), clientBeginRequest(), clientProcessRequest(), ClientRequestContext::clientRedirectDone(), ClientRequestContext::clientStoreIdDone(), ConnStateData::fakeAConnectRequest(), handleAdaptationFailure(), handleAdaptedHeader(), ClientRequestContext::hostHeaderIpVerify(), ClientRequestContext::hostHeaderVerify(), ClientRequestContext::hostHeaderVerifyFailed(), noteAdaptationAclCheckDone(), and ClientRequestContext::sslBumpAccessCheckDone().

◆ done()

bool AsyncJob::done ( ) const
protectedinherited

◆ doneAll()

bool ClientHttpRequest::doneAll ( ) const
inlineoverridevirtual

Reimplemented from AsyncJob.

Definition at line 217 of file client_side_request.h.

References AsyncJob::doneAll().

◆ endRequestSatisfaction()

◆ finalizedInCbdataChild()

virtual void CbdataParent::finalizedInCbdataChild ( )
privatepure virtualinherited

◆ freeResources()

◆ getConn()

ConnStateData * ClientHttpRequest::getConn ( ) const
inline

◆ gotEnough()

bool ClientHttpRequest::gotEnough ( ) const

◆ handleAdaptationBlock()

◆ handleAdaptationFailure()

void ClientHttpRequest::handleAdaptationFailure ( const ErrorDetail::Pointer errDetail,
bool  bypassable = false 
)
private

Handles an adaptation client request failure. Bypasses the error if possible, or build an error reply.

Definition at line 2150 of file client_side_request.cc.

References assert, Http::Message::body_pipe, calloutContext, calloutsError(), client_stream, BodyPipe::consumedSize(), dlink_node::data, debugs, doCallouts(), ERR_ICAP_FAILURE, StoreEntry::isEmpty(), dlink_node::prev, request, storeEntry(), and dlink_list::tail.

Referenced by noteAdaptationAnswer(), and noteBodyProducerAborted().

◆ handleAdaptedHeader()

◆ handleStopRequest()

void AsyncJob::handleStopRequest ( )
inlineinherited

Definition at line 73 of file AsyncJob.h.

References AsyncJob::mustStop().

◆ httpStart()

◆ initiateAdaptation()

CbcPointer< Adaptation::Initiate > Adaptation::Initiator::initiateAdaptation ( Initiate x)
protectedinherited

Definition at line 23 of file Initiator.cc.

References Adaptation::Initiate::initiator(), and Ident::Start().

Referenced by startAdaptation(), and Client::startAdaptation().

◆ initiated()

bool Adaptation::Initiator::initiated ( const CbcPointer< AsyncJob > &  job) const
inlineprotectedinherited

Definition at line 52 of file Initiator.h.

References CbcPointer< Cbc >::set().

Referenced by startAdaptation(), and Client::startAdaptation().

◆ initRequest()

void ClientHttpRequest::initRequest ( HttpRequest aRequest)

Initializes the current request with the virgin request. Call this method when the virgin request becomes known. To update the current request later, use resetRequest().

Definition at line 1609 of file client_side_request.cc.

References al, NotePairs::appendNewOnly(), assert, assignRequest(), getConn(), HTTPMSGLOCK(), HttpRequest::notes(), AccessLogEntry::request, request, and AccessLogEntry::syncNotes().

Referenced by ConnStateData::buildFakeRequest(), Http::One::Server::buildHttpRequest(), Downloader::buildRequest(), clientBeginRequest(), and Ftp::Server::parseOneRequest().

◆ loggingEntry() [1/2]

StoreEntry * ClientHttpRequest::loggingEntry ( ) const
inline

◆ loggingEntry() [2/2]

void ClientHttpRequest::loggingEntry ( StoreEntry newEntry)

Definition at line 1597 of file client_side_request.cc.

References StoreEntry::lock(), loggingEntry_, and StoreEntry::unlock().

◆ loggingTags()

◆ logRequest()

void ClientHttpRequest::logRequest ( )

◆ memObject()

MemObject * ClientHttpRequest::memObject ( ) const
inline

Definition at line 58 of file client_side_request.h.

References storeEntry().

Referenced by clientReplyContext::buildReplyHeader(), gotEnough(), and mRangeCLen().

◆ mRangeCLen()

int64_t ClientHttpRequest::mRangeCLen ( ) const

returns expected content length for multi-range replies note: assumes that httpHdrRangeCanonize has already been called warning: assumes that HTTP headers for individual ranges at the time of the actuall assembly will be exactly the same as the headers when clientMRangeCLen() is called

Definition at line 764 of file client_side.cc.

References assert, HttpHdrRange::begin(), HttpHdrRangeIter::boundary, MemBuf::clean(), clientPackRangeHdr(), clientPackTermBound(), debugs, HttpHdrRange::end(), MemBuf::init(), memObject(), HttpRequest::range, range_iter, request, MemBuf::reset(), MemBuf::size, and storeEntry().

Referenced by prepPartialResponseGeneration().

◆ multipartRangeRequest()

bool ClientHttpRequest::multipartRangeRequest ( ) const

Definition at line 720 of file client_side.cc.

References HttpRequest::multipartRangeRequest(), and request.

◆ mustStop()

◆ noteAdaptationAclCheckDone()

void ClientHttpRequest::noteAdaptationAclCheckDone ( Adaptation::ServiceGroupPointer  group)
overrideprivatevirtual

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 785 of file client_side_request.cc.

References Server::clientConnection, debugs, doCallouts(), fd_table, getConn(), HttpRequest::icapHistory(), ConnStateData::isOpen(), log_uri, req_sz, request, Comm::Connection::rfc931, sslGetUserEmail(), and startAdaptation().

◆ noteAdaptationAnswer()

void ClientHttpRequest::noteAdaptationAnswer ( const Adaptation::Answer answer)
overrideprivatevirtual

◆ noteBodyProducerAborted()

◆ noteBodyProductionEnded()

void ClientHttpRequest::noteBodyProductionEnded ( BodyPipe::Pointer  )
overrideprivatevirtual

◆ noteMoreBodyDataAvailable()

◆ onlyIfCached()

bool ClientHttpRequest::onlyIfCached ( ) const

◆ prepPartialResponseGeneration()

int64_t ClientHttpRequest::prepPartialResponseGeneration ( )

Prepares to satisfy a Range request with a generated HTTP 206 response. Initializes range_iter state to allow raw range_iter access.

Returns
Content-Length value for the future response; never negative

Definition at line 1932 of file client_side_request.cc.

References assert, HttpHdrRange::begin(), HttpHdrRangeIter::boundary, HttpHdrRangeIter::debt_size, HttpHdrRange::end(), HttpHdrRangeIter::end, mRangeCLen(), ClientHttpRequest::Out::offset, out, HttpHdrRangeIter::pos, HttpRequest::range, range_iter, rangeBoundaryStr(), request, HttpHdrRange::specs, HttpHdrRangeIter::updateSpec(), and HttpHdrRangeIter::valid.

◆ processRequest()

◆ rangeBoundaryStr()

String ClientHttpRequest::rangeBoundaryStr ( ) const

generates a "unique" boundary string for multipart responses the caller is responsible for cleaning the string

Definition at line 804 of file client_side.cc.

References String::append(), StoreEntry::getMD5Text(), storeEntry(), and visible_appname_string.

Referenced by prepPartialResponseGeneration().

◆ RegisterWithCacheManager()

void AsyncJob::RegisterWithCacheManager ( )
staticinherited

Definition at line 215 of file AsyncJob.cc.

References Mgr::RegisterAction(), and AsyncJob::ReportAllJobs().

Referenced by mainInitialize().

◆ ReportAllJobs()

void AsyncJob::ReportAllJobs ( StoreEntry e)
staticprotectedinherited

Definition at line 198 of file AsyncJob.cc.

References AllJobs().

Referenced by AsyncJob::RegisterWithCacheManager().

◆ requestSatisfactionMode()

bool ClientHttpRequest::requestSatisfactionMode ( ) const
inline

Definition at line 214 of file client_side_request.h.

References request_satisfaction_mode.

Referenced by clientReplyContext::buildReplyHeader().

◆ resetRequest()

void ClientHttpRequest::resetRequest ( HttpRequest newRequest)

Resets the current request to the latest adapted or redirected request. Call this every time adaptation or redirection changes the request. To set the virgin request, use initRequest().

Definition at line 1626 of file client_side_request.cc.

References HttpRequest::effectiveRequestUri(), request, and resetRequestXXX().

Referenced by handleAdaptedHeader().

◆ resetRequestXXX()

void ClientHttpRequest::resetRequestXXX ( HttpRequest newRequest,
bool  uriChanged 
)

resetRequest() variation for callers with custom URI change detection logic

Parameters
uriChangedwhether the new request URI differs from the current request URI

Definition at line 1633 of file client_side_request.cc.

References assert, assignRequest(), checkForInternalAccess(), clearRequest(), HttpRequest::effectiveRequestUri(), HttpRequest::flags, RequestFlags::redirected, request, SBufToCstring(), uri, and xfree.

Referenced by ClientRequestContext::clientRedirectDone(), and resetRequest().

◆ resumeBodyStorage()

void ClientHttpRequest::resumeBodyStorage ( )
private

Definition at line 2048 of file client_side_request.cc.

References adaptedBodySource, and noteMoreBodyDataAvailable().

Referenced by noteMoreBodyDataAvailable().

◆ setErrorUri()

void ClientHttpRequest::setErrorUri ( const char *  aUri)

sets log_uri and uri to an internally-generated "error:..." URI when neither the current request nor the parsed request URI are known

Definition at line 1915 of file client_side_request.cc.

References absorbLogUri(), al, assert, MAX_URL, AccessLogEntry::setVirginUrlForMissingRequest(), uri, urlCanonicalCleanWithoutRequest(), xstrdup, and xstrndup().

Referenced by ConnStateData::abortRequestParsing(), and ConnStateData::checkLogging().

◆ setLogUriToRawUri()

void ClientHttpRequest::setLogUriToRawUri ( const char *  rawUri,
const HttpRequestMethod method 
)

sets log_uri to a parsed request URI when Squid fails to parse or validate other request components, yielding no current request

Definition at line 1892 of file client_side_request.cc.

References absorbLogUri(), al, assert, AnyP::Uri::cleanup(), AccessLogEntry::setVirginUrlForMissingRequest(), urlCanonicalCleanWithoutRequest(), and xfree.

Referenced by Http::One::Server::buildHttpRequest().

◆ setLogUriToRequestUri()

void ClientHttpRequest::setLogUriToRequestUri ( )

◆ sslBumpEstablish()

◆ sslBumpNeed() [1/2]

Ssl::BumpMode ClientHttpRequest::sslBumpNeed ( ) const
inline

◆ sslBumpNeed() [2/2]

void ClientHttpRequest::sslBumpNeed ( Ssl::BumpMode  mode)

Definition at line 1498 of file client_side_request.cc.

References Ssl::bumpMode(), debugs, and sslBumpNeed_.

◆ sslBumpNeeded()

bool ClientHttpRequest::sslBumpNeeded ( ) const
inline

◆ sslBumpStart()

◆ start()

◆ Start()

◆ startAdaptation()

◆ status()

◆ stopConsumingFrom()

◆ storeEntry() [1/2]

StoreEntry * ClientHttpRequest::storeEntry ( ) const
inline

Definition at line 66 of file client_side_request.h.

References entry_.

Referenced by clientReplyContext::blockedHit(), clientReplyContext::buildReplyHeader(), clientReplyContext::cacheHit(), clientReplyContext::checkTransferDone(), clientIfRangeMatch(), clientReplyContext::cloneReply(), clientReplyContext::createStoreEntry(), clientReplyContext::doGetMoreData(), Ftp::Server::doProcessRequest(), endRequestSatisfaction(), clientReplyContext::errorInStream(), clientReplyContext::forgetHit(), ESIContext::getCachedAST(), handleAdaptationFailure(), handleAdaptedHeader(), clientReplyContext::handleIMSReply(), Http::One::Server::handleReply(), ESIContext::hasCachedAST(), clientReplyContext::identifyFoundObject(), memObject(), mRangeCLen(), noteMoreBodyDataAvailable(), clientReplyContext::processConditional(), clientReplyContext::processExpired(), clientReplyContext::processMiss(), clientReplyContext::processReplyAccessResult(), clientReplyContext::purgeDoPurge(), rangeBoundaryStr(), clientReplyContext::removeClientStoreReference(), clientReplyContext::replyStatus(), clientReplyContext::requestMoreBodyFromStore(), clientReplyContext::restoreState(), clientReplyContext::saveState(), clientReplyContext::sendClientOldEntry(), clientReplyContext::sendClientUpstreamResponse(), clientReplyContext::sendMoreData(), clientReplyContext::sendNotModified(), Ftp::Server::setReply(), clientReplyContext::setReplyToError(), clientReplyContext::setReplyToReply(), clientReplyContext::setReplyToStoreEntry(), clientReplyContext::startError(), statClientRequests(), clientReplyContext::storeNotOKTransferDone(), clientReplyContext::storeOKTransferDone(), clientReplyContext::traceReply(), clientReplyContext::triggerInitialStoreRead(), and ESIContext::updateCachedAST().

◆ storeEntry() [2/2]

void ClientHttpRequest::storeEntry ( StoreEntry newEntry)

Definition at line 1591 of file client_side_request.cc.

References entry_.

◆ swanSong()

◆ toCbdata()

virtual void * CbdataParent::toCbdata ( )
pure virtualinherited

◆ updateCounters()

◆ updateError()

void ClientHttpRequest::updateError ( const Error error)

◆ updateLoggingTags()

Member Data Documentation

◆ active

dlink_node ClientHttpRequest::active

◆ adaptedBodySource

◆ al

const AccessLogEntry::Pointer ClientHttpRequest::al

Definition at line 164 of file client_side_request.h.

Referenced by ClientHttpRequest(), TunnelStateData::TunnelStateData(), ~ClientHttpRequest(), ConnStateData::buildFakeRequest(), clientReplyContext::buildReplyHeader(), calloutsError(), ClientRequestContext::clientAccessCheckDone(), clientAclChecklistFill(), clientBeginRequest(), clientFollowXForwardedForCheck(), clientProcessRequest(), ClientRequestContext::clientRedirectDone(), ClientRequestContext::clientRedirectStart(), ClientRequestContext::clientStoreIdDone(), clientReplyContext::cloneReply(), constructHelperQuery(), doCallouts(), ESIContext::fail(), handleAdaptedHeader(), clientReplyContext::handleIMSReply(), Ftp::Server::handleUploadRequest(), initRequest(), loggingTags(), clientReplyContext::loggingTags(), logRequest(), ConnStateData::parseTlsHandshake(), clientReplyContext::processExpired(), clientReplyContext::processMiss(), clientReplyContext::processOnlyIfCachedMiss(), Http::One::Server::processParsedRequest(), clientReplyContext::processReplyAccessResult(), clientReplyContext::purgeDoPurge(), clientReplyContext::purgeRequest(), clientReplyContext::sendBodyTooLargeError(), clientReplyContext::sendPreconditionFailedError(), ConnStateData::serveDelayedError(), setErrorUri(), setLogUriToRawUri(), clientReplyContext::setReplyToError(), clientReplyContext::setReplyToReply(), ClientRequestContext::sslBumpAccessCheck(), ClientRequestContext::sslBumpAccessCheckDone(), sslBumpStart(), startAdaptation(), ConnStateData::startPeekAndSplice(), statClientRequests(), tunnelStart(), updateCounters(), updateError(), updateLoggingTags(), and Http::One::Server::writeControlMsgAndCall().

◆ calloutContext

◆ client_stream

◆ conn_

ConnStateData* ClientHttpRequest::conn_ = nullptr
private

Definition at line 193 of file client_side_request.h.

Referenced by ~ClientHttpRequest(), and getConn().

◆ entry_

StoreEntry* ClientHttpRequest::entry_ = nullptr
private

Definition at line 191 of file client_side_request.h.

Referenced by storeEntry().

◆ flags

◆ id

const InstanceId<AsyncJob> AsyncJob::id
inherited

Definition at line 75 of file AsyncJob.h.

◆ inCall

AsyncCall::Pointer AsyncJob::inCall
protectedinherited

◆ log_uri

char* const ClientHttpRequest::log_uri = nullptr

◆ loggingEntry_

StoreEntry* ClientHttpRequest::loggingEntry_ = nullptr
private

Definition at line 192 of file client_side_request.h.

Referenced by loggingEntry().

◆ maxReplyBodySize_

int64_t ClientHttpRequest::maxReplyBodySize_ = 0
private

Definition at line 190 of file client_side_request.h.

◆ out

◆ range_iter

HttpHdrRangeIter ClientHttpRequest::range_iter

Definition at line 161 of file client_side_request.h.

Referenced by freeResources(), mRangeCLen(), and prepPartialResponseGeneration().

◆ receivedWholeAdaptedReply

bool ClientHttpRequest::receivedWholeAdaptedReply = false
private

◆ redirect

◆ req_sz

◆ request

HttpRequest* const ClientHttpRequest::request = nullptr

Request currently being handled by ClientHttpRequest. Usually remains nil until the virgin request header is parsed or faked. Starts as a virgin request; see initRequest(). Adaptation and redirections replace it; see resetRequest().

Definition at line 133 of file client_side_request.h.

Referenced by Ssl::ServerBump::ServerBump(), TunnelStateData::TunnelStateData(), ~ClientHttpRequest(), ConnStateData::abortChunkedRequestBody(), assignRequest(), clientReplyContext::blockedHit(), clientReplyContext::buildReplyHeader(), clientReplyContext::cacheHit(), calloutsError(), checkForInternalAccess(), ClientRequestContext::checkNoCacheDone(), clientReplyContext::checkTransferDone(), clearRequest(), ClientRequestContext::clientAccessCheck(), ClientRequestContext::clientAccessCheckDone(), clientAclChecklistFill(), clientCheckPinning(), clientFollowXForwardedForCheck(), clientGetMoreData(), clientHierarchical(), clientIfRangeMatch(), clientInterpretRequestHeaders(), clientProcessRequest(), ClientRequestContext::clientRedirectDone(), ClientRequestContext::clientRedirectStart(), clientSetKeepaliveFlag(), ClientRequestContext::clientStoreIdDone(), constructHelperQuery(), clientReplyContext::createStoreEntry(), DelayId::DelayClient(), doCallouts(), clientReplyContext::doGetMoreData(), Ftp::Server::doProcessRequest(), ESIContextNew(), ESIContext::fail(), ConnStateData::fakeAConnectRequest(), gotEnough(), handleAdaptationBlock(), handleAdaptationFailure(), handleAdaptedHeader(), clientReplyContext::handleIMSReply(), Http::One::Server::handleReply(), Ftp::Server::handleUploadRequest(), ClientRequestContext::hostHeaderIpVerify(), ClientRequestContext::hostHeaderVerify(), ClientRequestContext::hostHeaderVerifyFailed(), clientReplyContext::identifyFoundObject(), clientReplyContext::identifyStoreObject(), initRequest(), logRequest(), mRangeCLen(), multipartRangeRequest(), noteAdaptationAclCheckDone(), noteBodyProducerAborted(), Ftp::Server::notePeerConnection(), onlyIfCached(), prepPartialResponseGeneration(), clientReplyContext::processConditional(), clientReplyContext::processExpired(), clientReplyContext::processMiss(), clientReplyContext::processOnlyIfCachedMiss(), Http::One::Server::processParsedRequest(), clientReplyContext::processReplyAccess(), clientReplyContext::processReplyAccessResult(), processRequest(), clientReplyContext::purgeAllCached(), clientReplyContext::purgeDoPurge(), clientReplyContext::purgeEntry(), clientReplyContext::purgeRequest(), clientReplyContext::replyStatus(), resetRequest(), resetRequestXXX(), clientReplyContext::restoreState(), clientReplyContext::saveState(), clientReplyContext::sendBodyTooLargeError(), clientReplyContext::sendMoreData(), clientReplyContext::sendNotModified(), clientReplyContext::sendNotModifiedOrPreconditionFailedError(), clientReplyContext::sendPreconditionFailedError(), clientReplyContext::sendStreamError(), ConnStateData::serveDelayedError(), Ftp::Server::setDataCommand(), setLogUriToRequestUri(), Ftp::Server::setReply(), clientReplyContext::setReplyToError(), clientReplyContext::setReplyToReply(), clientReplyContext::setReplyToStoreEntry(), ConnStateData::splice(), ClientRequestContext::sslBumpAccessCheck(), sslBumpEstablish(), sslBumpStart(), startAdaptation(), clientReplyContext::startError(), statClientRequests(), clientReplyContext::storeNotOKTransferDone(), ConnStateData::switchToHttps(), clientReplyContext::traceReply(), tunnelStart(), updateCounters(), updateError(), and Http::One::Server::writeControlMsgAndCall().

◆ request_satisfaction_mode

bool ClientHttpRequest::request_satisfaction_mode = false
private

◆ request_satisfaction_offset

int64_t ClientHttpRequest::request_satisfaction_offset = 0
private

Definition at line 253 of file client_side_request.h.

Referenced by handleAdaptedHeader(), and noteMoreBodyDataAvailable().

◆ sslBumpNeed_

Ssl::BumpMode ClientHttpRequest::sslBumpNeed_ = Ssl::bumpEnd
private

Definition at line 208 of file client_side_request.h.

Referenced by sslBumpEstablish(), sslBumpNeed(), sslBumpNeeded(), and sslBumpStart().

◆ started_

bool AsyncJob::started_ = false
protectedinherited

Definition at line 88 of file AsyncJob.h.

Referenced by AsyncJob::~AsyncJob(), AsyncJob::callEnd(), and AsyncJob::Start().

◆ stopReason

const char* AsyncJob::stopReason
protectedinherited

◆ store_id

String ClientHttpRequest::store_id

◆ swanSang_

bool AsyncJob::swanSang_ = false
protectedinherited

Definition at line 89 of file AsyncJob.h.

Referenced by AsyncJob::~AsyncJob(), and AsyncJob::callEnd().

◆ typeName

◆ uri

◆ virginHeadSource


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors