#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)
 
virtual ~ModXact ()
 
virtual void noteMoreBodySpaceAvailable (BodyPipe::Pointer)
 
virtual void noteBodyConsumerAborted (BodyPipe::Pointer)
 
virtual void noteMoreBodyDataAvailable (BodyPipe::Pointer)
 
virtual void noteBodyProductionEnded (BodyPipe::Pointer)
 
virtual void noteBodyProducerAborted (BodyPipe::Pointer)
 
virtual void handleCommConnected ()
 
virtual void handleCommWrote (size_t size)
 
virtual void handleCommRead (size_t size)
 
void handleCommWroteHeaders ()
 
void handleCommWroteBody ()
 
void noteServiceReady ()
 
void noteServiceAvailable ()
 
virtual void callException (const std::exception &e)
 called when the job throws during an async call More...
 
virtual void detailError (int errDetail)
 record error detail in the virgin request if possible More...
 
virtual void clearError ()
 clear stored error details, if any; used for retries/repeats More...
 
virtual AccessLogEntry::Pointer masterLogEntry ()
 The master transaction log entry. More...
 
void disableRetries ()
 
void disableRepeats (const char *reason)
 
bool retriable () const
 
bool repeatable () const
 
void noteCommConnected (const CommConnectCbParams &io)
 
void noteCommWrote (const CommIoCbParams &io)
 
void noteCommRead (const CommIoCbParams &io)
 
void noteCommTimedout (const CommTimeoutCbParams &io)
 
void noteCommClosed (const CommCloseCbParams &io)
 
virtual void callEnd ()
 called right after the called job method More...
 
void dnsLookupDone (const ipcache_addrs *ia)
 
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)
 
virtual void * toCbdata ()=0
 

Static Public Member Functions

static Pointer Start (AsyncJob *job)
 starts a freshly created job (i.e., makes the job asynchronous) More...
 

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...
 

Protected Member Functions

virtual void noteInitiatorAborted ()
 
virtual void handleCommTimedout ()
 
virtual void handleCommClosed ()
 
void handleSecuredPeer (Security::EncryptorAnswer &answer)
 
void openConnection ()
 
void closeConnection ()
 
void dieOnConnectionFailure ()
 
bool haveConnection () const
 
void scheduleRead ()
 
void scheduleWrite (MemBuf &buf)
 
void updateTimeout ()
 
void cancelRead ()
 
bool parseHttpMsg (Http::Message *msg)
 
bool mayReadMore () const
 
bool doneWithIo () const
 
virtual const char * status () const
 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 > &)
 

Protected Attributes

Comm::ConnectionPointer connection
 ICAP server connection. More...
 
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
 
const char * stopReason
 
AsyncCall::Pointer connector
 
AsyncCall::Pointer reader
 
AsyncCall::Pointer writer
 
AsyncCall::Pointer closer
 
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 * typeName
 kid (leaf) class name, for debugging More...
 
AsyncCall::Pointer inCall
 the asynchronous call being handled, if any More...
 
const InstanceId< AsyncJobid
 job identifier More...
 

Private Member Functions

 CBDATA_CLASS (ModXact)
 
virtual void start ()
 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 ()
 
virtual bool doneReading () const
 
virtual bool doneWriting () const
 
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...
 
virtual bool doneAll () const
 whether positive goal has been reached More...
 
virtual void swanSong ()
 
void stopReceiving ()
 
void stopSending (bool nicely)
 
void stopWriting (bool nicely)
 
void stopParsing (const bool checkUnparsedData=true)
 
void stopBackup ()
 
virtual void fillPendingStatus (MemBuf &buf) const
 
virtual void fillDoneStatus (MemBuf &buf) const
 
virtual bool fillVirginHttpHeader (MemBuf &) const
 
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 ()
 
virtual void finalizeLogInfo ()
 

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...
 

Detailed Description

Definition at line 141 of file ModXact.h.

Member Typedef Documentation

◆ Pointer [1/3]

Definition at line 25 of file BodyPipe.h.

◆ Pointer [2/3]

Definition at line 34 of file AsyncJob.h.

◆ Pointer [3/3]

Definition at line 45 of file BodyPipe.h.

Constructor & Destructor Documentation

◆ ModXact()

◆ ~ModXact()

Adaptation::Icap::ModXact::~ModXact ( )
virtual

Definition at line 1288 of file ModXact.cc.

References bodyParser, and trailerParser.

Member Function Documentation

◆ addLastRequestChunk()

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

◆ backup()

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

◆ bypassFailure()

◆ callEnd()

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

◆ callException()

◆ callStart()

void AsyncJob::callStart ( AsyncCall call)
inherited

◆ canBackupEverything()

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

◆ canBeCalled()

bool AsyncJob::canBeCalled ( AsyncCall call) const
inherited

Definition at line 101 of file AsyncJob.cc.

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

Referenced by AsyncJob::swanSong().

◆ cancelRead()

◆ CBDATA_CLASS()

Adaptation::Icap::ModXact::CBDATA_CLASS ( ModXact  )
private

◆ checkConsuming()

◆ clearError()

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

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 2006 of file ModXact.cc.

References HttpRequest::clearError(), and request().

◆ clearInitiator()

◆ closeChunk()

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

Definition at line 384 of file ModXact.cc.

References MemBuf::append(), and crlf.

Referenced by addLastRequestChunk(), and writeSomeBody().

◆ closeConnection()

◆ decideOnParsingBody()

◆ decideOnPreview()

◆ decideOnRetries()

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

◆ decideWritingAfterPreview()

◆ deleteThis()

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

◆ detailError()

void Adaptation::Icap::ModXact::detailError ( int  errDetail)
virtual

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 1994 of file ModXact.cc.

References HttpRequest::detailError(), ERR_ICAP_FAILURE, and request().

Referenced by callException(), noteBodyConsumerAborted(), and swanSong().

◆ dieOnConnectionFailure()

◆ disableBypass()

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

◆ disableRepeats()

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

◆ disableRetries()

◆ dnsLookupDone()

◆ done()

◆ doneAll()

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

◆ doneReading()

virtual bool Adaptation::Icap::ModXact::doneReading ( ) const
inlineprivatevirtual

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 206 of file ModXact.h.

Referenced by doneAll(), fillDoneStatus(), fillPendingStatus(), and readMore().

◆ doneSending()

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

◆ doneWithIo()

◆ doneWriting()

virtual bool Adaptation::Icap::ModXact::doneWriting ( ) const
inlineprivatevirtual

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 207 of file ModXact.h.

References buf, head, and request().

◆ echoMore()

◆ encapsulateHead()

◆ estimateVirginBody()

◆ expectHttpBody()

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

Definition at line 1126 of file ModXact.cc.

References gotEncapsulated().

Referenced by decideOnParsingBody().

◆ expectHttpHeader()

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

Definition at line 1121 of file ModXact.cc.

References gotEncapsulated().

Referenced by parseHttpHead(), and validate200Ok().

◆ expectIcapTrailers()

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

◆ fillDoneStatus()

◆ fillPendingStatus()

◆ fillVirginHttpHeader()

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

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 1984 of file ModXact.cc.

References NULL.

◆ finalizeLogInfo()

void Adaptation::Icap::ModXact::finalizeLogInfo ( )
privatevirtual

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 1315 of file ModXact.cc.

References adapted, AccessLogEntry::adapted_request, Adaptation::Icap::Xaction::al, Adaptation::Icap::Xaction::alep, assert, Http::Message::body_pipe, AccessLogEntry::IcapLogEntry::bodyBytesRead, MemBuf::buf, AccessLogEntry::cache, AccessLogEntry::CacheDetails::caddr, Adaptation::Icap::InOut::cause, Adaptation::Service::cfg(), MemBuf::clean(), HttpRequest::client_addr, AccessLogEntry::HttpDetails::clientReplySz, AccessLogEntry::HttpDetails::clientRequestSz, AccessLogEntry::HttpDetails::code, AccessLogEntry::CacheDetails::code, HttpReply::content_type, AccessLogEntry::HttpDetails::content_type, Adaptation::Icap::Xaction::finalizeLogInfo(), Http::Message::hdr_sz, MessageSizes::header, Adaptation::Icap::InOut::header, Http::Message::header, AccessLogEntry::headers, AccessLogEntry::CacheDetails::highOffset, AccessLogEntry::http, HTTPMSGLOCK(), AccessLogEntry::icap, HttpRequest::icapHistory(), AccessLogEntry::icp, ICP_INVALID, MemBuf::init(), max(), Adaptation::ServiceConfig::method, Must, NULL, AccessLogEntry::IcpDetails::opcode, HttpHeader::packInto(), MessageSizes::payloadData, prepareLogWithRequestDetails(), BodyPipe::producedSize(), AccessLogEntry::Headers::reply, AccessLogEntry::reply, replyHttpBodySize, replyHttpHeaderSize, AccessLogEntry::IcapLogEntry::reqMethod, AccessLogEntry::request, AccessLogEntry::CacheDetails::rfc931, Adaptation::Icap::Xaction::service(), HttpReply::sline, AccessLogEntry::CacheDetails::ssluser, Http::StatusLine::status(), String::termedBuf(), AccessLogEntry::url, virgin, virginRequest(), xstrdup, and zero.

◆ finishNullOrEmptyBodyPreview()

◆ gotEncapsulated()

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

◆ handle100Continue()

◆ handle200Ok()

◆ handle204NoContent()

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

Definition at line 926 of file ModXact.cc.

References prepEchoing(), and stopParsing().

Referenced by parseIcapHead().

◆ handle206PartialContent()

◆ handleCommClosed()

void Adaptation::Icap::Xaction::handleCommClosed ( )
protectedvirtualinherited

◆ handleCommConnected()

◆ handleCommRead()

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

◆ handleCommTimedout()

◆ handleCommWrote()

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

◆ handleCommWroteBody()

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

Definition at line 481 of file ModXact.cc.

References writeMore().

Referenced by handleCommWrote().

◆ handleCommWroteHeaders()

◆ handleSecuredPeer()

◆ handleUnknownScode()

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

Definition at line 1054 of file ModXact.cc.

References stopBackup(), stopParsing(), and TexcHere.

Referenced by parseIcapHead().

◆ haveConnection()

◆ initiator()

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

◆ makeAdaptedBodyPipe()

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

◆ makeAllowHeader()

◆ makeRequestHeaders()

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

Definition at line 1391 of file ModXact.cc.

References Adaptation::Icap::Preview::ad(), HttpRequest::adaptHistory(), NotePairs::add(), alMaster, MemBuf::append(), Packable::appendf(), base64_encode_final(), base64_encode_init(), base64_encode_len, base64_encode_update(), Adaptation::Icap::InOut::cause, Adaptation::Service::cfg(), MemBuf::clean(), HttpRequest::client_addr, MemBuf::content(), MemBuf::contentSize(), crlf, Adaptation::Icap::Preview::enabled(), encapsulateHead(), Adaptation::Icap::SizedEstimate::expected(), HttpRequest::extacl_passwd, HttpRequest::extacl_user, finishNullOrEmptyBodyPreview(), HttpHeader::getById(), Adaptation::History::getXxRecord(), HttpHeader::has(), NotePairs::hasPair(), Adaptation::Icap::InOut::header, Http::Message::header, Adaptation::ServiceConfig::host, Adaptation::Icap::Xaction::icapRequest, HttpRequest::indirect_client_addr, MemBuf::init(), Ip::Address::isAnyAddr(), Ip::Address::isNoAddr(), SBuf::length(), makeAllowHeader(), makeUsernameHeader(), Adaptation::Config::masterx_shared_name, MAX_IPSTRLEN, MAX_LOGIN_SZ, Adaptation::Config::metaHeaders, Adaptation::History::metaHeaders, Adaptation::ServiceConfig::method, Adaptation::methodReqmod, Adaptation::methodRespmod, Adaptation::ServiceConfig::methodStr(), mkrfc1123(), Must, NULL, Http::Message::parseCharBuf(), Adaptation::ServiceConfig::port, preview, Http::PROXY_AUTHENTICATE, Http::PROXY_AUTHORIZATION, String::rawBuf(), SBuf::rawContent(), request(), Adaptation::Icap::Config::reuse_connections, Adaptation::Config::send_client_ip, Adaptation::Config::send_username, Adaptation::Icap::Xaction::service(), String::size(), squid_curtime, SQUIDSTRINGPH, SQUIDSTRINGPRINT, Adaptation::Icap::TheConfig, Ip::Address::toStr(), Adaptation::ServiceConfig::uri, Adaptation::Config::use_indirect_client, virgin, virginBody, and virginRequest().

Referenced by handleCommConnected().

◆ makeUsernameHeader()

◆ masterLogEntry()

virtual AccessLogEntry::Pointer Adaptation::Icap::ModXact::masterLogEntry ( )
inlinevirtual

Reimplemented from Adaptation::Icap::Xaction.

Definition at line 181 of file ModXact.h.

◆ maybeAllocateHttpMsg()

◆ mayReadMore()

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

◆ mustStop()

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

Definition at line 69 of file AsyncJob.cc.

References debugs, AsyncJob::inCall, Must, NULL, AsyncJob::stopReason, and AsyncJob::typeName.

Referenced by HttpStateData::abortAll(), Ftp::Client::abortAll(), Comm::TcpAcceptor::acceptOne(), Adaptation::Ecap::XactionRep::adaptationAborted(), Adaptation::AccessCheck::callBack(), AsyncJob::callException(), Security::PeerConnector::connectionClosed(), HttpStateData::continueAfterParsingHeader(), Ftp::Client::ctrlClosed(), Adaptation::Iterator::handleAdaptationBlock(), Adaptation::Iterator::handleAdaptationError(), Log::TcpLogger::handleClosure(), Adaptation::Icap::Xaction::handleCommClosed(), Http::Tunneler::handleConnectionClosure(), Mgr::Forwarder::handleError(), Ipc::Forwarder::handleError(), Ipc::Forwarder::handleException(), Ipc::Inquirer::handleException(), HttpStateData::handleMoreRequestBodyAvailable(), Ipc::Inquirer::handleRemoteAck(), Ipc::Forwarder::handleTimeout(), HttpStateData::httpStateConnClosed(), HttpStateData::httpTimeout(), Comm::ConnOpener::noteAbort(), noteBodyConsumerAborted(), Snmp::Forwarder::noteCommClosed(), Snmp::Inquirer::noteCommClosed(), Mgr::Inquirer::noteCommClosed(), Mgr::Forwarder::noteCommClosed(), Mgr::StoreToCommWriter::noteCommClosed(), Adaptation::Icap::Xaction::noteCommRead(), Rock::HeaderUpdater::noteDoneReading(), Adaptation::Iterator::noteInitiatorAborted(), Adaptation::Icap::Xaction::noteInitiatorAborted(), Adaptation::Ecap::XactionRep::noteInitiatorAborted(), HttpStateData::readReply(), Comm::ConnOpener::sendAnswer(), Rock::Rebuild::start(), Security::PeerConnector::start(), HttpStateData::start(), Ipc::UdsSender::timedout(), and HttpStateData::wroteLast().

◆ noteBodyConsumerAborted()

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

◆ noteBodyProducerAborted()

◆ noteBodyProductionEnded()

◆ noteCommClosed()

◆ noteCommConnected()

◆ noteCommRead()

◆ noteCommTimedout()

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

◆ noteCommWrote()

◆ noteInitiatorAborted()

◆ noteMoreBodyDataAvailable()

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

◆ noteMoreBodySpaceAvailable()

◆ noteServiceAvailable()

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

◆ noteServiceReady()

◆ openChunk()

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

Definition at line 379 of file ModXact.cc.

References Packable::appendf().

Referenced by addLastRequestChunk(), and writeSomeBody().

◆ openConnection()

◆ packHead()

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

Definition at line 1630 of file ModXact.cc.

References Http::Message::packInto().

Referenced by encapsulateHead(), and prepEchoing().

◆ parseBody()

◆ parseHead()

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

Definition at line 1112 of file ModXact.cc.

References parsePart(), and Http::Message::reset().

Referenced by parseHttpHead(), and parseIcapHead().

◆ parseHeaders()

◆ parseHttpHead()

◆ parseHttpMsg()

◆ parseIcapHead()

◆ parseIcapTrailer()

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

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

Definition at line 881 of file ModXact.cc.

References debugs, HttpHeader::entries, parsePart(), stopParsing(), Adaptation::Icap::TrailerParser::trailer, and trailerParser.

Referenced by parseMore().

◆ parseMore()

◆ 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 1094 of file ModXact.cc.

References SBuf::c_str(), Adaptation::Icap::Xaction::commEof, SBuf::consume(), debugs, error(), SBuf::length(), Must, Adaptation::Icap::ModXact::State::parsing, Adaptation::Icap::Xaction::readBuf, Http::scNone, and state.

Referenced by parseHead(), and parseIcapTrailer().

◆ prepBackup()

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

◆ prepEchoing()

◆ prepPartialBodyEchoing()

◆ readMore()

◆ repeatable()

◆ retriable()

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

◆ scheduleRead()

◆ scheduleWrite()

◆ sendAnswer()

◆ service()

◆ setOutcome()

◆ shouldAllow204()

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

Definition at line 1668 of file ModXact.cc.

References canBackupEverything(), and Adaptation::Icap::Xaction::service().

Referenced by makeAllowHeader().

◆ shouldAllow206any()

◆ shouldAllow206in()

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

Definition at line 1684 of file ModXact.cc.

References Adaptation::Icap::Preview::enabled(), preview, and shouldAllow206any().

Referenced by makeAllowHeader().

◆ shouldAllow206out()

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

Definition at line 1690 of file ModXact.cc.

References canBackupEverything(), and shouldAllow206any().

Referenced by makeAllowHeader().

◆ Start()

◆ start()

◆ startReading()

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

◆ startSending()

◆ startWriting()

◆ status()

◆ stopBackup()

◆ stopConsumingFrom()

◆ stopParsing()

◆ stopProducingFor()

◆ stopReceiving()

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

◆ stopSending()

◆ stopWriting()

◆ swanSong()

◆ tellQueryAborted()

◆ toCbdata()

virtual void* CbdataParent::toCbdata ( )
pure virtualinherited

◆ updateSources()

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

Definition at line 2017 of file ModXact.cc.

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

Referenced by startSending().

◆ updateTimeout()

◆ validate200Ok()

◆ virginBodyEndReached()

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

◆ virginConsume()

◆ 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

◆ waitForService()

◆ writeMore()

◆ writePreviewBody()

◆ writePrimeBody()

◆ writeSomeBody()

Member Data Documentation

◆ adapted

◆ adaptHistoryId

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

Definition at line 318 of file ModXact.h.

Referenced by start(), and swanSong().

◆ al

◆ alep

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

Definition at line 148 of file Xaction.h.

Referenced by finalizeLogInfo(), and Adaptation::Icap::Xaction::maybeLog().

◆ alMaster

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

Definition at line 372 of file ModXact.h.

Referenced by makeRequestHeaders().

◆ attempts

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

Definition at line 61 of file Xaction.h.

Referenced by Adaptation::Icap::Launcher::launchXaction(), and start().

◆ bodyParser

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

Definition at line 302 of file ModXact.h.

Referenced by decideOnParsingBody(), parseBody(), stopParsing(), and ~ModXact().

◆ canStartBypass

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

◆ closer

◆ commEof

◆ connection

◆ connector

◆ extensionParser

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

Definition at line 322 of file ModXact.h.

Referenced by decideOnParsingBody(), and parseBody().

◆ icap_tio_finish

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

◆ icap_tio_start

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

◆ icap_tr_start

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

◆ icapReply

◆ icapRequest

◆ id

const InstanceId<AsyncJob> AsyncJob::id
protectedinherited

Definition at line 72 of file AsyncJob.h.

◆ ignoreLastWrite

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

Definition at line 138 of file Xaction.h.

Referenced by Adaptation::Icap::Xaction::noteCommWrote(), and stopWriting().

◆ inCall

◆ isRepeatable

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

◆ isRetriable

◆ preview

◆ protectGroupBypass

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

Definition at line 305 of file ModXact.h.

Referenced by disableBypass(), fillPendingStatus(), and virginConsume().

◆ readBuf

◆ reader

◆ 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 316 of file ModXact.h.

Referenced by decideOnParsingBody(), finalizeLogInfo(), and parseBody().

◆ 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 311 of file ModXact.h.

Referenced by finalizeLogInfo(), and parseHttpHead().

◆ reuseConnection

◆ state

◆ stopReason

const char* Adaptation::Icap::Xaction::stopReason
protectedinherited

Definition at line 140 of file Xaction.h.

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

◆ theInitiator

◆ theService

◆ trailerParser

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

◆ typeName

◆ virgin

◆ virginBody

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

◆ virginBodySending

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

◆ virginBodyWriting

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

◆ virginConsumed

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

◆ writer


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors