#include <ModXact.h>

Inheritance diagram for Adaptation::Icap::ModXact:
Collaboration diagram for Adaptation::Icap::ModXact:

Classes

class  State
 

Public Types

typedef CbcPointer< AsyncJobPointer
 
typedef CbcPointer< BodyProducerPointer
 
typedef CbcPointer< BodyConsumerPointer
 

Public Member Functions

 ModXact (Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, ServiceRep::Pointer &s)
 
 ~ModXact () override
 
void noteMoreBodySpaceAvailable (BodyPipe::Pointer) override
 
void noteBodyConsumerAborted (BodyPipe::Pointer) override
 
void noteMoreBodyDataAvailable (BodyPipe::Pointer) override
 
void noteBodyProductionEnded (BodyPipe::Pointer) override
 
void noteBodyProducerAborted (BodyPipe::Pointer) override
 
void startShoveling () override
 starts sending/receiving ICAP messages More...
 
void handleCommWrote (size_t size) override
 
void handleCommRead (size_t size) override
 
void handleCommWroteHeaders ()
 
void handleCommWroteBody ()
 
void noteServiceReady ()
 
void noteServiceAvailable ()
 
void callException (const std::exception &e) override
 called when the job throws during an async call More...
 
void detailError (const ErrorDetail::Pointer &errDetail) override
 record error detail in the virgin request if possible More...
 
void clearError () override
 clear stored error details, if any; used for retries/repeats More...
 
AccessLogEntry::Pointer masterLogEntry () override
 The master transaction log entry. More...
 
void disableRetries ()
 
void disableRepeats (const char *reason)
 
bool retriable () const
 
bool repeatable () const
 
void noteCommConnected (const CommConnectCbParams &io)
 called when the connection attempt to an ICAP service completes (successfully or not) More...
 
void noteCommWrote (const CommIoCbParams &io)
 
void noteCommRead (const CommIoCbParams &io)
 
void noteCommTimedout (const CommTimeoutCbParams &io)
 
void noteCommClosed (const CommCloseCbParams &io)
 
void callEnd () override
 called right after the called job method More...
 
void dnsLookupDone (std::optional< Ip::Address >)
 
ServiceRepservice ()
 
void initiator (const CbcPointer< Initiator > &i)
 sets initiator More...
 
bool canBeCalled (AsyncCall &call) const
 whether we can be called More...
 
void callStart (AsyncCall &call)
 
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

InOut virgin
 
InOut adapted
 
HttpRequesticapRequest
 sent (or at least created) ICAP request More...
 
HttpReply::Pointer icapReply
 received ICAP reply, if any More...
 
int attempts
 the number of times we tried to get to the service, including this time More...
 
const InstanceId< AsyncJobid
 job identifier More...
 

Protected Member Functions

void noteInitiatorAborted () override
 
void handleSecuredPeer (Security::EncryptorAnswer &answer)
 
void openConnection ()
 
void closeConnection ()
 
bool haveConnection () const
 
void scheduleRead ()
 
void scheduleWrite (MemBuf &buf)
 
void updateTimeout ()
 
void cancelRead ()
 
bool parseHttpMsg (Http::Message *msg)
 
bool mayReadMore () const
 
bool doneWithIo () const
 
const char * status () const override
 internal cleanup; do not call directly More...
 
void setOutcome (const XactOutcome &xo)
 
void tellQueryAborted (bool final)
 
void sendAnswer (const Answer &answer)
 
void clearInitiator ()
 
void deleteThis (const char *aReason)
 
void mustStop (const char *aReason)
 
bool done () const
 the job is destroyed in callEnd() when done() More...
 
void stopProducingFor (RefCount< BodyPipe > &, bool atEof)
 
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

Adaptation::Icap::ServiceRep::Pointer theService
 
SBuf readBuf
 
bool commEof
 
bool reuseConnection
 
bool isRetriable
 can retry on persistent connection failures More...
 
bool isRepeatable
 can repeat if no or unsatisfactory response More...
 
bool ignoreLastWrite
 
bool waitingForDns
 expecting a ipcache_nbgethostbyname() callback More...
 
AsyncCall::Pointer reader
 
AsyncCall::Pointer writer
 
AccessLogEntry::Pointer alep
 icap.log entry More...
 
AccessLogEntryal
 short for *alep More...
 
timeval icap_tr_start
 
timeval icap_tio_start
 
timeval icap_tio_finish
 
CbcPointer< InitiatortheInitiator
 
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 (ModXact)
 
void start () override
 called by AsyncStart; do not call directly More...
 
const HttpRequestvirginRequest () const
 locates the request, either as a cause or as a virgin message itself More...
 
void estimateVirginBody ()
 
void makeAdaptedBodyPipe (const char *what)
 
void waitForService ()
 
bool doneSending () const
 
void startWriting ()
 
void writeMore ()
 
void writePreviewBody ()
 
void writePrimeBody ()
 
void writeSomeBody (const char *label, size_t size)
 
void decideWritingAfterPreview (const char *previewKind)
 determine state.writing after we wrote the entire preview More...
 
void startReading ()
 
void readMore ()
 
bool doneReading () const override
 
bool doneWriting () const override
 
size_t virginContentSize (const VirginBodyAct &act) const
 
const char * virginContentData (const VirginBodyAct &act) const
 
bool virginBodyEndReached (const VirginBodyAct &act) const
 
void makeRequestHeaders (MemBuf &buf)
 
void makeAllowHeader (MemBuf &buf)
 
void makeUsernameHeader (const HttpRequest *request, MemBuf &buf)
 
void addLastRequestChunk (MemBuf &buf)
 
void openChunk (MemBuf &buf, size_t chunkSize, bool ieof)
 
void closeChunk (MemBuf &buf)
 
void virginConsume ()
 
void finishNullOrEmptyBodyPreview (MemBuf &buf)
 
void decideOnPreview ()
 
void decideOnRetries ()
 
bool shouldAllow204 ()
 
bool shouldAllow206any ()
 
bool shouldAllow206in ()
 
bool shouldAllow206out ()
 
bool canBackupEverything () const
 
void prepBackup (size_t expectedSize)
 
void backup (const MemBuf &buf)
 
void parseMore ()
 
void parseHeaders ()
 
void parseIcapHead ()
 
void parseHttpHead ()
 
bool parseHead (Http::Message *head)
 
void decideOnParsingBody ()
 
void parseBody ()
 
void parseIcapTrailer ()
 
void maybeAllocateHttpMsg ()
 
void handle100Continue ()
 
bool validate200Ok ()
 
void handle200Ok ()
 
void handle204NoContent ()
 
void handle206PartialContent ()
 
void handleUnknownScode ()
 
void bypassFailure ()
 
void startSending ()
 
void disableBypass (const char *reason, bool includeGroupBypass)
 
void prepEchoing ()
 
void prepPartialBodyEchoing (uint64_t pos)
 
void echoMore ()
 
void updateSources ()
 Update the Http::Message sources. More...
 
bool doneAll () const override
 whether positive goal has been reached More...
 
void swanSong () override
 
void stopReceiving ()
 
void stopSending (bool nicely)
 
void stopWriting (bool nicely)
 
void stopParsing (const bool checkUnparsedData=true)
 
void stopBackup ()
 
void fillPendingStatus (MemBuf &buf) const override
 
void fillDoneStatus (MemBuf &buf) const override
 
bool fillVirginHttpHeader (MemBuf &) const override
 
template<class Part >
bool parsePart (Part *part, const char *description)
 
void packHead (MemBuf &httpBuf, const Http::Message *head)
 
void encapsulateHead (MemBuf &icapBuf, const char *section, MemBuf &httpBuf, const Http::Message *head)
 
bool gotEncapsulated (const char *section) const
 
bool expectHttpHeader () const
 whether ICAP response header indicates HTTP header presence More...
 
bool expectHttpBody () const
 whether ICAP response header indicates HTTP body presence More...
 
bool expectIcapTrailers () const
 whether ICAP response header indicates ICAP trailers presence More...
 
void checkConsuming ()
 
void finalizeLogInfo () override
 
void useTransportConnection (const Comm::ConnectionPointer &)
 
void useIcapConnection (const Comm::ConnectionPointer &)
 react to the availability of a fully-ready ICAP connection More...
 
void dieOnConnectionFailure ()
 
void tellQueryAborted ()
 
void maybeLog ()
 
virtual void finalizedInCbdataChild ()=0
 hack: ensure CBDATA_CHILD() after a toCbdata()-defining CBDATA_INTERMEDIATE() More...
 

Private Attributes

SizedEstimate virginBody
 
VirginBodyAct virginBodyWriting
 
VirginBodyAct virginBodySending
 
uint64_t virginConsumed
 
Preview preview
 
Http1::TeChunkedParserbodyParser
 
bool canStartBypass
 
bool protectGroupBypass
 
int64_t replyHttpHeaderSize
 
int64_t replyHttpBodySize
 
int adaptHistoryId
 adaptation history slot reservation More...
 
TrailerParsertrailerParser
 
ChunkExtensionValueParser extensionParser
 
class Adaptation::Icap::ModXact::State state
 
AccessLogEntry::Pointer alMaster
 Master transaction AccessLogEntry. More...
 
JobWait< Comm::ConnOpenertransportWait
 waits for a transport connection to the ICAP server to be established/opened More...
 
JobWait< Ssl::IcapPeerConnectorencryptionWait
 waits for the established transport connection to be secured/encrypted More...
 
Comm::ConnectionPointer connection
 open and, if necessary, secured connection to the ICAP server (or nil) More...
 
AsyncCall::Pointer closer
 

Detailed Description

Definition at line 141 of file ModXact.h.

Member Typedef Documentation

◆ Pointer [1/3]

Definition at line 34 of file AsyncJob.h.

◆ Pointer [2/3]

Definition at line 25 of file BodyPipe.h.

◆ Pointer [3/3]

Definition at line 45 of file BodyPipe.h.

Constructor & Destructor Documentation

◆ ModXact()

◆ ~ModXact()

Adaptation::Icap::ModXact::~ModXact ( )
override

Definition at line 1286 of file ModXact.cc.

Member Function Documentation

◆ addLastRequestChunk()

void Adaptation::Icap::ModXact::addLastRequestChunk ( MemBuf buf)
private

Definition at line 369 of file ModXact.cc.

◆ backup()

void Adaptation::Icap::ModXact::backup ( const MemBuf buf)
private

◆ bypassFailure()

void Adaptation::Icap::ModXact::bypassFailure ( )
private

Definition at line 691 of file ModXact.cc.

References debugs, and Must.

◆ callEnd()

void Adaptation::Icap::Xaction::callEnd ( )
overridevirtualinherited

called right after the called job method

Reimplemented from AsyncJob.

Definition at line 381 of file Xaction.cc.

References AsyncJob::callEnd(), and debugs.

◆ callException()

void Adaptation::Icap::ModXact::callException ( const std::exception &  e)
overridevirtual

Reimplemented from AsyncJob.

Definition at line 665 of file ModXact.cc.

References Adaptation::Icap::Xaction::callException(), debugs, Here, and TextException::id().

◆ callStart()

void AsyncJob::callStart ( AsyncCall call)
inherited

◆ canBackupEverything()

bool Adaptation::Icap::ModXact::canBackupEverything ( ) const
private

Definition at line 1697 of file ModXact.cc.

References TheBackupLimit.

◆ canBeCalled()

bool AsyncJob::canBeCalled ( AsyncCall call) const
inherited

Definition at line 117 of file AsyncJob.cc.

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

◆ cancelRead()

void Adaptation::Icap::Xaction::cancelRead ( )
protectedinherited

Definition at line 488 of file Xaction.cc.

References Must, and Comm::ReadCancel().

◆ CBDATA_CHILD()

Adaptation::Icap::ModXact::CBDATA_CHILD ( ModXact  )
private

◆ checkConsuming()

void Adaptation::Icap::ModXact::checkConsuming ( )
private

Definition at line 640 of file ModXact.cc.

References debugs.

◆ clearError()

void Adaptation::Icap::ModXact::clearError ( )
overridevirtual

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 2007 of file ModXact.cc.

References HttpRequest::clearError().

◆ clearInitiator()

void Adaptation::Initiate::clearInitiator ( )
protectedinherited

Definition at line 74 of file Initiate.cc.

◆ closeChunk()

void Adaptation::Icap::ModXact::closeChunk ( MemBuf buf)
private

Definition at line 381 of file ModXact.cc.

References MemBuf::append(), and crlf.

◆ closeConnection()

void Adaptation::Icap::Xaction::closeConnection ( )
protectedinherited

◆ decideOnParsingBody()

void Adaptation::Icap::ModXact::decideOnParsingBody ( )
private

Definition at line 1141 of file ModXact.cc.

References debugs, Must, and Http::One::TeChunkedParser::parseExtensionValuesWith().

◆ decideOnPreview()

void Adaptation::Icap::ModXact::decideOnPreview ( )
private

◆ decideOnRetries()

void Adaptation::Icap::ModXact::decideOnRetries ( )
private

Definition at line 1714 of file ModXact.cc.

◆ decideWritingAfterPreview()

void Adaptation::Icap::ModXact::decideWritingAfterPreview ( const char *  previewKind)
private

Definition at line 292 of file ModXact.cc.

References debugs.

◆ deleteThis()

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

◆ detailError()

void Adaptation::Icap::ModXact::detailError ( const ErrorDetail::Pointer errDetail)
overridevirtual

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 1995 of file ModXact.cc.

References HttpRequest::detailError(), and ERR_ICAP_FAILURE.

◆ dieOnConnectionFailure()

void Adaptation::Icap::Xaction::dieOnConnectionFailure ( )
privateinherited

Definition at line 308 of file Xaction.cc.

References debugs, MakeNamedErrorDetail(), and TexcHere.

Referenced by Adaptation::Icap::Xaction::dnsLookupDone().

◆ disableBypass()

void Adaptation::Icap::ModXact::disableBypass ( const char *  reason,
bool  includeGroupBypass 
)
private

Definition at line 717 of file ModXact.cc.

References debugs.

◆ disableRepeats()

void Adaptation::Icap::Xaction::disableRepeats ( const char *  reason)
inherited

Definition at line 125 of file Xaction.cc.

References debugs.

Referenced by Adaptation::Icap::Launcher::launchXaction().

◆ disableRetries()

void Adaptation::Icap::Xaction::disableRetries ( )
inherited

Definition at line 118 of file Xaction.cc.

References debugs.

Referenced by Adaptation::Icap::Launcher::launchXaction().

◆ dnsLookupDone()

◆ done()

bool AsyncJob::done ( ) const
protectedinherited

◆ doneAll()

bool Adaptation::Icap::ModXact::doneAll ( ) const
overrideprivatevirtual

Reimplemented from AsyncJob.

Definition at line 528 of file ModXact.cc.

References Adaptation::Icap::Xaction::doneAll().

◆ doneReading()

bool Adaptation::Icap::ModXact::doneReading ( ) const
inlineoverrideprivatevirtual

◆ doneSending()

bool Adaptation::Icap::ModXact::doneSending ( ) const
private

Definition at line 608 of file ModXact.cc.

◆ doneWithIo()

bool Adaptation::Icap::Xaction::doneWithIo ( ) const
protectedinherited

Definition at line 534 of file Xaction.cc.

◆ doneWriting()

bool Adaptation::Icap::ModXact::doneWriting ( ) const
inlineoverrideprivatevirtual

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 208 of file ModXact.h.

References Adaptation::Icap::ModXact::State::doneWriting(), and state.

◆ echoMore()

void Adaptation::Icap::ModXact::echoMore ( )
private

Definition at line 575 of file ModXact.cc.

References debugs, Must, and size.

◆ encapsulateHead()

◆ estimateVirginBody()

void Adaptation::Icap::ModXact::estimateVirginBody ( )
private

◆ expectHttpBody()

bool Adaptation::Icap::ModXact::expectHttpBody ( ) const
private

Definition at line 1123 of file ModXact.cc.

◆ expectHttpHeader()

bool Adaptation::Icap::ModXact::expectHttpHeader ( ) const
private

Definition at line 1118 of file ModXact.cc.

◆ expectIcapTrailers()

bool Adaptation::Icap::ModXact::expectIcapTrailers ( ) const
private

Definition at line 1128 of file ModXact.cc.

References Http::ALLOW, DBG_IMPORTANT, debugs, Must, String::size(), and Http::TRAILER.

◆ fillDoneStatus()

void Adaptation::Icap::ModXact::fillDoneStatus ( MemBuf buf) const
overrideprivatevirtual

◆ fillPendingStatus()

void Adaptation::Icap::ModXact::fillPendingStatus ( MemBuf buf) const
overrideprivatevirtual

◆ fillVirginHttpHeader()

bool Adaptation::Icap::ModXact::fillVirginHttpHeader ( MemBuf mb) const
overrideprivatevirtual

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 1985 of file ModXact.cc.

◆ finalizedInCbdataChild()

virtual void CbdataParent::finalizedInCbdataChild ( )
privatepure virtualinherited

◆ finalizeLogInfo()

◆ finishNullOrEmptyBodyPreview()

void Adaptation::Icap::ModXact::finishNullOrEmptyBodyPreview ( MemBuf buf)
private

Definition at line 1734 of file ModXact.cc.

References Must.

◆ gotEncapsulated()

bool Adaptation::Icap::ModXact::gotEncapsulated ( const char *  section) const
private

Definition at line 1813 of file ModXact.cc.

◆ handle100Continue()

void Adaptation::Icap::ModXact::handle100Continue ( )
private

Definition at line 896 of file ModXact.cc.

References Must.

◆ handle200Ok()

void Adaptation::Icap::ModXact::handle200Ok ( )
private

Definition at line 915 of file ModXact.cc.

◆ handle204NoContent()

void Adaptation::Icap::ModXact::handle204NoContent ( )
private

Definition at line 923 of file ModXact.cc.

◆ handle206PartialContent()

void Adaptation::Icap::ModXact::handle206PartialContent ( )
private

Definition at line 929 of file ModXact.cc.

References debugs, and Must.

◆ handleCommRead()

void Adaptation::Icap::ModXact::handleCommRead ( size_t  size)
overridevirtual

Implements Adaptation::Icap::Xaction.

Definition at line 567 of file ModXact.cc.

References current_time, and Must.

◆ handleCommWrote()

void Adaptation::Icap::ModXact::handleCommWrote ( size_t  size)
overridevirtual

Implements Adaptation::Icap::Xaction.

Definition at line 208 of file ModXact.cc.

References debugs.

◆ handleCommWroteBody()

void Adaptation::Icap::ModXact::handleCommWroteBody ( )

Definition at line 478 of file ModXact.cc.

◆ handleCommWroteHeaders()

void Adaptation::Icap::ModXact::handleCommWroteHeaders ( )

Definition at line 218 of file ModXact.cc.

References Must.

◆ handleSecuredPeer()

◆ handleStopRequest()

void AsyncJob::handleStopRequest ( )
inlineinherited

Definition at line 73 of file AsyncJob.h.

References AsyncJob::mustStop().

◆ handleUnknownScode()

void Adaptation::Icap::ModXact::handleUnknownScode ( )
private

Definition at line 1051 of file ModXact.cc.

References TexcHere.

◆ haveConnection()

bool Adaptation::Icap::Xaction::haveConnection ( ) const
protectedinherited

Definition at line 541 of file Xaction.cc.

◆ initiator()

void Adaptation::Initiate::initiator ( const CbcPointer< Initiator > &  i)
inherited

Definition at line 54 of file Initiate.cc.

References Must, and CbcPointer< Cbc >::valid().

Referenced by Adaptation::Initiator::initiateAdaptation().

◆ makeAdaptedBodyPipe()

void Adaptation::Icap::ModXact::makeAdaptedBodyPipe ( const char *  what)
private

Definition at line 1862 of file ModXact.cc.

References debugs, and Must.

◆ makeAllowHeader()

void Adaptation::Icap::ModXact::makeAllowHeader ( MemBuf buf)
private

Definition at line 1522 of file ModXact.cc.

References Packable::appendf(), and debugs.

◆ makeRequestHeaders()

◆ makeUsernameHeader()

◆ masterLogEntry()

AccessLogEntry::Pointer Adaptation::Icap::ModXact::masterLogEntry ( )
inlineoverridevirtual

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 182 of file ModXact.h.

References alMaster.

◆ maybeAllocateHttpMsg()

void Adaptation::Icap::ModXact::maybeAllocateHttpMsg ( )
private

◆ maybeLog()

void Adaptation::Icap::Xaction::maybeLog ( )
privateinherited

Definition at line 605 of file Xaction.cc.

References IcapLogfileStatus, icapLogLog(), and LOG_ENABLE.

◆ mayReadMore()

bool Adaptation::Icap::Xaction::mayReadMore ( ) const
protectedinherited

Definition at line 518 of file Xaction.cc.

◆ mustStop()

◆ noteBodyConsumerAborted()

void Adaptation::Icap::ModXact::noteBodyConsumerAborted ( BodyPipe::Pointer  )
overridevirtual

Implements BodyProducer.

Definition at line 1279 of file ModXact.cc.

References MakeNamedErrorDetail().

◆ noteBodyProducerAborted()

void Adaptation::Icap::ModXact::noteBodyProducerAborted ( BodyPipe::Pointer  )
overridevirtual

Implements BodyConsumer.

Definition at line 1255 of file ModXact.cc.

References Must.

◆ noteBodyProductionEnded()

void Adaptation::Icap::ModXact::noteBodyProductionEnded ( BodyPipe::Pointer  )
overridevirtual

Implements BodyConsumer.

Definition at line 1242 of file ModXact.cc.

References Must.

◆ noteCommClosed()

void Adaptation::Icap::Xaction::noteCommClosed ( const CommCloseCbParams io)
inherited

Definition at line 361 of file Xaction.cc.

References MakeNamedErrorDetail().

Referenced by Adaptation::Icap::Xaction::useIcapConnection().

◆ noteCommConnected()

void Adaptation::Icap::Xaction::noteCommConnected ( const CommConnectCbParams io)
inherited

◆ noteCommRead()

◆ noteCommTimedout()

void Adaptation::Icap::Xaction::noteCommTimedout ( const CommTimeoutCbParams io)
inherited

Definition at line 349 of file Xaction.cc.

References assert, debugs, and Here.

Referenced by Adaptation::Icap::Xaction::updateTimeout().

◆ noteCommWrote()

void Adaptation::Icap::Xaction::noteCommWrote ( const CommIoCbParams io)
inherited

◆ noteInitiatorAborted()

void Adaptation::Icap::Xaction::noteInitiatorAborted ( )
overrideprotectedvirtualinherited

Implements Adaptation::Initiate.

Definition at line 547 of file Xaction.cc.

References debugs, MakeNamedErrorDetail(), and Adaptation::Icap::xoGone.

◆ noteMoreBodyDataAvailable()

void Adaptation::Icap::ModXact::noteMoreBodyDataAvailable ( BodyPipe::Pointer  )
overridevirtual

Implements BodyConsumer.

Definition at line 1233 of file ModXact.cc.

◆ noteMoreBodySpaceAvailable()

void Adaptation::Icap::ModXact::noteMoreBodySpaceAvailable ( BodyPipe::Pointer  )
overridevirtual

Implements BodyProducer.

Definition at line 1268 of file ModXact.cc.

References Must.

◆ noteServiceAvailable()

void Adaptation::Icap::ModXact::noteServiceAvailable ( )

Definition at line 168 of file ModXact.cc.

References Must.

Referenced by waitForService().

◆ noteServiceReady()

void Adaptation::Icap::ModXact::noteServiceReady ( )

Definition at line 151 of file ModXact.cc.

References Must, and TexcHere.

Referenced by waitForService().

◆ openChunk()

void Adaptation::Icap::ModXact::openChunk ( MemBuf buf,
size_t  chunkSize,
bool  ieof 
)
private

Definition at line 376 of file ModXact.cc.

References Packable::appendf().

◆ openConnection()

◆ packHead()

void Adaptation::Icap::ModXact::packHead ( MemBuf httpBuf,
const Http::Message head 
)
private

Definition at line 1631 of file ModXact.cc.

References head.

◆ parseBody()

void Adaptation::Icap::ModXact::parseBody ( )
private

Definition at line 1161 of file ModXact.cc.

References BodyPipeCheckout::buf, BodyPipeCheckout::checkIn(), debugs, and Must.

◆ parseHead()

bool Adaptation::Icap::ModXact::parseHead ( Http::Message head)
private

Definition at line 1109 of file ModXact.cc.

References head.

◆ parseHeaders()

void Adaptation::Icap::ModXact::parseHeaders ( )
private

Definition at line 746 of file ModXact.cc.

References debugs, and Must.

◆ parseHttpHead()

void Adaptation::Icap::ModXact::parseHttpHead ( )
private

Definition at line 1061 of file ModXact.cc.

References Must.

◆ parseHttpMsg()

bool Adaptation::Icap::Xaction::parseHttpMsg ( Http::Message msg)
protectedinherited

◆ parseIcapHead()

◆ parseIcapTrailer()

void Adaptation::Icap::ModXact::parseIcapTrailer ( )
private

Parses ICAP trailers and stops parsing, if all trailer data have been received.

Definition at line 878 of file ModXact.cc.

References debugs.

◆ parseMore()

void Adaptation::Icap::ModXact::parseMore ( )
private

Definition at line 650 of file ModXact.cc.

References debugs.

◆ parsePart()

template<class Part >
bool Adaptation::Icap::ModXact::parsePart ( Part *  part,
const char *  description 
)
private

parses a message header or trailer

Returns
true on success
false if more data is needed
Exceptions
TextExceptionon unrecoverable error

Definition at line 1091 of file ModXact.cc.

References debugs, error(), Must, and Http::scNone.

◆ prepBackup()

void Adaptation::Icap::ModXact::prepBackup ( size_t  expectedSize)
private

◆ prepEchoing()

◆ prepPartialBodyEchoing()

void Adaptation::Icap::ModXact::prepPartialBodyEchoing ( uint64_t  pos)
private

Called when we received use-original-body chunk extension in 206 response. We actually start sending (echoing or not) in startSending().

Definition at line 1022 of file ModXact.cc.

References debugs, Must, and Adaptation::Icap::xoPartEcho.

◆ readMore()

void Adaptation::Icap::ModXact::readMore ( )
private

Definition at line 546 of file ModXact.cc.

References debugs.

◆ RegisterWithCacheManager()

void AsyncJob::RegisterWithCacheManager ( )
staticinherited

Definition at line 215 of file AsyncJob.cc.

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

Referenced by mainInitialize().

◆ repeatable()

bool Adaptation::Icap::Xaction::repeatable ( ) const
inlineinherited

Definition at line 53 of file Xaction.h.

References Adaptation::Icap::Xaction::isRepeatable.

◆ ReportAllJobs()

void AsyncJob::ReportAllJobs ( StoreEntry e)
staticprotectedinherited

Definition at line 198 of file AsyncJob.cc.

References AllJobs().

Referenced by AsyncJob::RegisterWithCacheManager().

◆ retriable()

bool Adaptation::Icap::Xaction::retriable ( ) const
inlineinherited

Definition at line 52 of file Xaction.h.

References Adaptation::Icap::Xaction::isRetriable.

◆ scheduleRead()

void Adaptation::Icap::Xaction::scheduleRead ( )
protectedinherited

Definition at line 415 of file Xaction.cc.

References JobCallback, Must, Adaptation::Icap::Xaction::noteCommRead(), and Comm::Read().

◆ scheduleWrite()

void Adaptation::Icap::Xaction::scheduleWrite ( MemBuf buf)
protectedinherited

◆ sendAnswer()

void Adaptation::Initiate::sendAnswer ( const Answer answer)
protectedinherited

Definition at line 79 of file Initiate.cc.

References Adaptation::Initiator::noteAdaptationAnswer(), and ScheduleCallHere.

◆ service()

Adaptation::Icap::ServiceRep & Adaptation::Icap::Xaction::service ( )
inherited

Definition at line 112 of file Xaction.cc.

References Must.

◆ setOutcome()

void Adaptation::Icap::Xaction::setOutcome ( const XactOutcome xo)
protectedinherited

Definition at line 561 of file Xaction.cc.

References debugs, and Adaptation::Icap::xoUnknown.

◆ shouldAllow204()

bool Adaptation::Icap::ModXact::shouldAllow204 ( )
private

Definition at line 1669 of file ModXact.cc.

◆ shouldAllow206any()

bool Adaptation::Icap::ModXact::shouldAllow206any ( )
private

◆ shouldAllow206in()

bool Adaptation::Icap::ModXact::shouldAllow206in ( )
private

Definition at line 1685 of file ModXact.cc.

◆ shouldAllow206out()

bool Adaptation::Icap::ModXact::shouldAllow206out ( )
private

Definition at line 1691 of file ModXact.cc.

◆ start()

void Adaptation::Icap::ModXact::start ( )
overrideprivatevirtual

Reimplemented from AsyncJob.

Definition at line 88 of file ModXact.cc.

References Adaptation::History::recordXactStart(), and Adaptation::Icap::Xaction::start().

◆ Start()

◆ startReading()

void Adaptation::Icap::ModXact::startReading ( )
private

Definition at line 535 of file ModXact.cc.

References Must.

◆ startSending()

void Adaptation::Icap::ModXact::startSending ( )
private

Definition at line 769 of file ModXact.cc.

References Adaptation::Answer::Forward().

◆ startShoveling()

void Adaptation::Icap::ModXact::startShoveling ( )
overridevirtual

◆ startWriting()

void Adaptation::Icap::ModXact::startWriting ( )
private

Definition at line 179 of file ModXact.cc.

◆ status()

const char * Adaptation::Icap::Xaction::status ( ) const
overrideprotectedvirtualinherited

for debugging, starts with space

Reimplemented from AsyncJob.

Definition at line 636 of file Xaction.cc.

References MemBuf::append(), Packable::appendf(), MemBuf::content(), MemBuf::reset(), and MemBuf::terminate().

Referenced by ModXact().

◆ stopBackup()

void Adaptation::Icap::ModXact::stopBackup ( )
private

Definition at line 518 of file ModXact.cc.

References debugs.

◆ stopConsumingFrom()

◆ stopParsing()

void Adaptation::Icap::ModXact::stopParsing ( const bool  checkUnparsedData = true)
private

Definition at line 1213 of file ModXact.cc.

References debugs, and Must.

◆ stopProducingFor()

void BodyProducer::stopProducingFor ( RefCount< BodyPipe > &  p,
bool  atEof 
)
protectedinherited

◆ stopReceiving()

void Adaptation::Icap::ModXact::stopReceiving ( )
private

◆ stopSending()

void Adaptation::Icap::ModXact::stopSending ( bool  nicely)
private

Definition at line 614 of file ModXact.cc.

References debugs, and Must.

◆ stopWriting()

void Adaptation::Icap::ModXact::stopWriting ( bool  nicely)
private

Definition at line 486 of file ModXact.cc.

References debugs.

◆ swanSong()

void Adaptation::Icap::ModXact::swanSong ( )
overrideprivatevirtual

◆ tellQueryAborted() [1/2]

void Adaptation::Icap::Xaction::tellQueryAborted ( )
privateinherited

Definition at line 592 of file Xaction.cc.

References CallJobHere1.

◆ tellQueryAborted() [2/2]

void Adaptation::Initiate::tellQueryAborted ( bool  final)
protectedinherited

Definition at line 87 of file Initiate.cc.

References Adaptation::Answer::Error().

◆ toCbdata()

virtual void * CbdataParent::toCbdata ( )
pure virtualinherited

◆ updateSources()

void Adaptation::Icap::ModXact::updateSources ( )
private

Definition at line 2018 of file ModXact.cc.

References Must, Http::Message::srcIcap, and Http::Message::srcIcaps.

◆ updateTimeout()

void Adaptation::Icap::Xaction::updateTimeout ( )
protectedinherited

◆ useIcapConnection()

void Adaptation::Icap::Xaction::useIcapConnection ( const Comm::ConnectionPointer conn)
privateinherited

◆ useTransportConnection()

void Adaptation::Icap::Xaction::useTransportConnection ( const Comm::ConnectionPointer conn)
privateinherited

React to the availability of a transport connection to the ICAP service. The given connection may (or may not) be secured already.

Definition at line 270 of file Xaction.cc.

References assert, asyncCallback, conn, Adaptation::Icap::Config::connect_timeout(), fd_table, Adaptation::Icap::Xaction::handleSecuredPeer(), Comm::IsConnOpen(), and Adaptation::Icap::TheConfig.

◆ validate200Ok()

bool Adaptation::Icap::ModXact::validate200Ok ( )
private

Definition at line 887 of file ModXact.cc.

References Adaptation::methodReqmod, and Adaptation::methodRespmod.

◆ virginBodyEndReached()

bool Adaptation::Icap::ModXact::virginBodyEndReached ( const VirginBodyAct act) const
private

◆ virginConsume()

void Adaptation::Icap::ModXact::virginConsume ( )
private

◆ virginContentData()

const char * Adaptation::Icap::ModXact::virginContentData ( const VirginBodyAct act) const
private

◆ virginContentSize()

size_t Adaptation::Icap::ModXact::virginContentSize ( const VirginBodyAct act) const
private

◆ virginRequest()

const HttpRequest & Adaptation::Icap::ModXact::virginRequest ( ) const
private

Definition at line 386 of file ModXact.cc.

References Must.

◆ waitForService()

void Adaptation::Icap::ModXact::waitForService ( )
private

◆ writeMore()

void Adaptation::Icap::ModXact::writeMore ( )
private

Definition at line 238 of file ModXact.cc.

References debugs, Must, and TexcHere.

◆ writePreviewBody()

void Adaptation::Icap::ModXact::writePreviewBody ( )
private

Definition at line 274 of file ModXact.cc.

References debugs, min(), Must, size, and size_t.

◆ writePrimeBody()

void Adaptation::Icap::ModXact::writePrimeBody ( )
private

Definition at line 305 of file ModXact.cc.

References debugs, Must, size, and size_t.

◆ writeSomeBody()

void Adaptation::Icap::ModXact::writeSomeBody ( const char *  label,
size_t  size 
)
private

Member Data Documentation

◆ adapted

InOut Adaptation::Icap::ModXact::adapted

Definition at line 172 of file ModXact.h.

◆ adaptHistoryId

int Adaptation::Icap::ModXact::adaptHistoryId
private

Definition at line 319 of file ModXact.h.

◆ al

AccessLogEntry& Adaptation::Icap::Xaction::al
protectedinherited

Definition at line 152 of file Xaction.h.

◆ alep

AccessLogEntry::Pointer Adaptation::Icap::Xaction::alep
protectedinherited

Definition at line 151 of file Xaction.h.

◆ alMaster

AccessLogEntry::Pointer Adaptation::Icap::ModXact::alMaster
private

Definition at line 373 of file ModXact.h.

Referenced by masterLogEntry().

◆ attempts

int Adaptation::Icap::Xaction::attempts
inherited

Definition at line 67 of file Xaction.h.

Referenced by Adaptation::Icap::Launcher::launchXaction().

◆ bodyParser

Http1::TeChunkedParser* Adaptation::Icap::ModXact::bodyParser
private

Definition at line 303 of file ModXact.h.

◆ canStartBypass

bool Adaptation::Icap::ModXact::canStartBypass
private

Definition at line 305 of file ModXact.h.

◆ closer

AsyncCall::Pointer Adaptation::Icap::Xaction::closer
privateinherited

Definition at line 168 of file Xaction.h.

◆ commEof

bool Adaptation::Icap::Xaction::commEof
protectedinherited

Definition at line 141 of file Xaction.h.

Referenced by doneReading(), and Adaptation::Icap::OptXact::doneReading().

◆ connection

Comm::ConnectionPointer Adaptation::Icap::Xaction::connection
privateinherited

Definition at line 166 of file Xaction.h.

◆ encryptionWait

JobWait<Ssl::IcapPeerConnector> Adaptation::Icap::Xaction::encryptionWait
privateinherited

Definition at line 163 of file Xaction.h.

◆ extensionParser

ChunkExtensionValueParser Adaptation::Icap::ModXact::extensionParser
private

Definition at line 323 of file ModXact.h.

◆ icap_tio_finish

timeval Adaptation::Icap::Xaction::icap_tio_finish
protectedinherited

Definition at line 156 of file Xaction.h.

Referenced by Adaptation::Icap::Xaction::Xaction().

◆ icap_tio_start

timeval Adaptation::Icap::Xaction::icap_tio_start
protectedinherited

Definition at line 155 of file Xaction.h.

Referenced by Adaptation::Icap::Xaction::Xaction().

◆ icap_tr_start

timeval Adaptation::Icap::Xaction::icap_tr_start
protectedinherited

Definition at line 154 of file Xaction.h.

Referenced by Adaptation::Icap::Xaction::Xaction().

◆ icapReply

HttpReply::Pointer Adaptation::Icap::Xaction::icapReply
inherited

Definition at line 64 of file Xaction.h.

Referenced by ModXact().

◆ icapRequest

HttpRequest* Adaptation::Icap::Xaction::icapRequest
inherited

Definition at line 63 of file Xaction.h.

Referenced by Adaptation::Icap::Xaction::Xaction().

◆ id

const InstanceId<AsyncJob> AsyncJob::id
inherited

Definition at line 75 of file AsyncJob.h.

◆ ignoreLastWrite

bool Adaptation::Icap::Xaction::ignoreLastWrite
protectedinherited

Definition at line 145 of file Xaction.h.

◆ inCall

AsyncCall::Pointer AsyncJob::inCall
protectedinherited

◆ isRepeatable

bool Adaptation::Icap::Xaction::isRepeatable
protectedinherited

Definition at line 144 of file Xaction.h.

Referenced by Adaptation::Icap::Xaction::repeatable().

◆ isRetriable

bool Adaptation::Icap::Xaction::isRetriable
protectedinherited

Definition at line 143 of file Xaction.h.

Referenced by Adaptation::Icap::Xaction::retriable().

◆ preview

Preview Adaptation::Icap::ModXact::preview
private

Definition at line 301 of file ModXact.h.

◆ protectGroupBypass

bool Adaptation::Icap::ModXact::protectGroupBypass
private

Definition at line 306 of file ModXact.h.

◆ readBuf

SBuf Adaptation::Icap::Xaction::readBuf
protectedinherited

Definition at line 140 of file Xaction.h.

◆ reader

AsyncCall::Pointer Adaptation::Icap::Xaction::reader
protectedinherited

Definition at line 148 of file Xaction.h.

◆ replyHttpBodySize

int64_t Adaptation::Icap::ModXact::replyHttpBodySize
private

size of dechunked HTTP body in ICAP reply or -1 if there is not any encapsulated message data

Definition at line 317 of file ModXact.h.

◆ replyHttpHeaderSize

int64_t Adaptation::Icap::ModXact::replyHttpHeaderSize
private

size of HTTP header in ICAP reply or -1 if there is not any encapsulated message data

Definition at line 312 of file ModXact.h.

◆ reuseConnection

bool Adaptation::Icap::Xaction::reuseConnection
protectedinherited

Definition at line 142 of file Xaction.h.

◆ started_

bool AsyncJob::started_ = false
protectedinherited

Definition at line 88 of file AsyncJob.h.

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

◆ state

class Adaptation::Icap::ModXact::State Adaptation::Icap::ModXact::state
private

Referenced by doneReading(), and doneWriting().

◆ stopReason

const char* AsyncJob::stopReason
protectedinherited

◆ swanSang_

bool AsyncJob::swanSang_ = false
protectedinherited

Definition at line 89 of file AsyncJob.h.

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

◆ theInitiator

CbcPointer<Initiator> Adaptation::Initiate::theInitiator
protectedinherited

Definition at line 51 of file Initiate.h.

◆ theService

Adaptation::Icap::ServiceRep::Pointer Adaptation::Icap::Xaction::theService
protectedinherited

Definition at line 138 of file Xaction.h.

◆ trailerParser

TrailerParser* Adaptation::Icap::ModXact::trailerParser
private

Definition at line 321 of file ModXact.h.

◆ transportWait

JobWait<Comm::ConnOpener> Adaptation::Icap::Xaction::transportWait
privateinherited

Definition at line 160 of file Xaction.h.

◆ typeName

◆ virgin

InOut Adaptation::Icap::ModXact::virgin

Definition at line 171 of file ModXact.h.

Referenced by ModXact().

◆ virginBody

SizedEstimate Adaptation::Icap::ModXact::virginBody
private

Definition at line 297 of file ModXact.h.

◆ virginBodySending

VirginBodyAct Adaptation::Icap::ModXact::virginBodySending
private

Definition at line 299 of file ModXact.h.

◆ virginBodyWriting

VirginBodyAct Adaptation::Icap::ModXact::virginBodyWriting
private

Definition at line 298 of file ModXact.h.

◆ virginConsumed

uint64_t Adaptation::Icap::ModXact::virginConsumed
private

Definition at line 300 of file ModXact.h.

◆ waitingForDns

bool Adaptation::Icap::Xaction::waitingForDns
protectedinherited

Definition at line 146 of file Xaction.h.

◆ writer

AsyncCall::Pointer Adaptation::Icap::Xaction::writer
protectedinherited

Definition at line 149 of file Xaction.h.


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors