Client.cc
Go to the documentation of this file.
366 debugs(11, 5, "sentRequestBody: FD " << io.fd << ": size " << io.size << ": errflag " << io.flag << ".");
389 debugs(11, DBG_IMPORTANT, "ERROR: sentRequestBody failure: FD " << io.fd << ": " << xstrerr(io.xerrno));
476purgeEntriesByHeader(HttpRequest *req, const char *reqUrl, Http::Message *rep, Http::HdrType hdr)
905 const auto err = new ErrorState(ERR_ICAP_FAILURE, Http::scInternalServerError, request.getRaw(), fwd->al);
965 // That check now only happens on REQMOD pre-cache and REPMOD post-cache, in processReplyAccess().
RefCount< AsyncCallT< Dialer > > asyncCall(int aDebugSection, int aDebugLevel, const char *aName, const Dialer &aDialer)
Definition: AsyncCall.h:156
#define JobCallback(dbgSection, dbgLevel, Dialer, job, method)
Convenience macro to create a Dialer-based job callback.
Definition: AsyncJobCalls.h:69
ErrorDetail::Pointer MakeNamedErrorDetail(const char *name)
Definition: Detail.cc:54
Definition: FilledChecklist.h:32
AccessLogEntry::Pointer al
info for the future access.log, and external ACL
Definition: FilledChecklist.h:101
static bool Start(Method method, VectPoint vp, HttpRequest *req, HttpReply *, const AccessLogEntryPointer &, Adaptation::Initiator *)
Definition: AccessCheck.cc:30
summarizes adaptation service answer for the noteAdaptationAnswer() API
Definition: Answer.h:23
CbcPointer< Initiate > initiateAdaptation(Initiate *x)
< starts freshly created initiate and returns a safe pointer to it
Definition: Initiator.cc:23
void clearAdaptation(CbcPointer< Initiate > &x)
clears the pointer (does not call announceInitiatorAbort)
Definition: Initiator.cc:32
void announceInitiatorAbort(CbcPointer< Initiate > &x)
inform the transaction about abnormal termination and clear the pointer
Definition: Initiator.cc:38
bool initiated(const CbcPointer< AsyncJob > &job) const
Must(initiated(initiate)) instead of Must(initiate.set()), for clarity.
Definition: Initiator.h:52
iterates services in ServiceGroup, starting adaptation launchers
Definition: Iterator.h:32
Definition: AsyncJob.h:32
void stopConsumingFrom(RefCount< BodyPipe > &)
Definition: BodyPipe.cc:118
Definition: BodyPipe.h:62
Definition: BodyPipe.h:91
bool setConsumerIfNotLate(const Consumer::Pointer &aConsumer)
Definition: BodyPipe.cc:228
void stopProducingFor(RefCount< BodyPipe > &, bool atEof)
Definition: BodyPipe.cc:107
void noteAdaptationAnswer(const Adaptation::Answer &answer) override
Definition: Client.cc:697
void endAdaptedBodyConsumption()
called when the entire adapted response body is consumed
Definition: Client.cc:830
void noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer group) override
Definition: Client.cc:957
void adaptVirginReplyBody(const char *buf, ssize_t len)
Definition: Client.cc:629
void noteMoreBodySpaceAvailable(BodyPipe::Pointer) override
Definition: Client.cc:671
size_t replyBodySpace(const MemBuf &readBuf, const size_t minSpace) const
Definition: Client.cc:1098
void noteMoreBodyDataAvailable(BodyPipe::Pointer) override
Definition: Client.cc:270
void resumeBodyStorage()
called by StoreEntry when it has more buffer space available
Definition: Client.cc:752
virtual HttpRequestPointer originalRequest()
a hack to reach HttpStateData::orignal_request
Definition: Client.cc:570
void handleMoreAdaptedBodyAvailable()
Definition: Client.cc:768
virtual bool getMoreRequestBody(MemBuf &buf)
either fill buf with available [encoded] request body bytes or return false
Definition: Client.cc:438
void startAdaptation(const Adaptation::ServiceGroupPointer &group, HttpRequest *cause)
Initiate an asynchronous adaptation transaction which will call us back.
Definition: Client.cc:578
virtual void abortAll(const char *reason)=0
abnormal transaction termination; reason is for debugging only
bool abortOnBadEntry(const char *abortReason)
Entry-dependent callbacks use this check to quit if the entry went bad.
Definition: Client.cc:258
virtual void handleRequestBodyProducerAborted()=0
Definition: Client.cc:351
void handleAdaptedBodyProducerAborted()
Definition: Client.cc:845
void handleRequestBodyProductionEnded()
Definition: Client.cc:329
bool blockCaching()
whether to prevent caching of an otherwise cachable response
Definition: Client.cc:552
void handleAdaptedBodyProductionEnded()
Definition: Client.cc:815
void handleAdaptationBlocked(const Adaptation::Answer &answer)
Definition: Client.cc:924
void noteBodyProductionEnded(BodyPipe::Pointer) override
Definition: Client.cc:284
size_t calcBufferSpaceToReserve(const size_t space, const size_t wantSpace) const
determine how much space the buffer needs to reserve
Definition: Client.cc:1063
void addVirginReplyBody(const char *buf, ssize_t len)
Definition: Client.cc:1038
void noteBodyProducerAborted(BodyPipe::Pointer) override
Definition: Client.cc:298
CbcPointer< Adaptation::Initiate > adaptedHeadSource
Definition: Client.h:186
virtual bool doneWithServer() const =0
void adjustBodyBytesRead(const int64_t delta)
initializes bodyBytesRead stats if needed and applies delta
Definition: Client.cc:1014
void handleAdaptationAborted(bool bypassable=false)
Definition: Client.cc:885
void markParsedVirginReplyAsWhole(const char *reasonWeAreSure)
Definition: Client.cc:158
void noteBodyConsumerAborted(BodyPipe::Pointer) override
Definition: Client.cc:685
virtual void noteDelayAwareReadChance()=0
virtual bool mayReadVirginReplyBody() const =0
whether we may receive more virgin response body bytes
virtual void closeServer()=0
void handleMoreRequestBodyAvailable()
Definition: Client.cc:319
virtual void processReplyBody()=0
virtual void sentRequestBody(const CommIoCbParams &io)=0
Definition: Client.cc:364
virtual const Comm::ConnectionPointer & dataConnection() const =0
virtual void haveParsedReplyHeaders()
called when we have final (possibly adapted) reply headers; kids extend
Definition: Client.cc:537
Definition: CommCalls.h:166
Definition: CommCalls.h:114
Definition: errorpage.h:89
Definition: FwdState.h:53
void markStoredReplyAsWhole(const char *whyWeAreSure)
Definition: FwdState.cc:580
int64_t bodyBytesRead
number of body bytes received from the next hop or -1
Definition: HierarchyLogEntry.h:71
static int64_t const UnknownPosition
Definition: HttpHeaderRange.h:32
Definition: HttpReply.h:25
bool expectingBody(const HttpRequestMethod &, int64_t &) const override
Definition: HttpReply.cc:528
Definition: HttpRequest.h:49
void detailError(const err_type c, const ErrorDetail::Pointer &d)
sets error detail if no earlier detail was available
Definition: HttpRequest.h:101
const SBuf & effectiveRequestUri() const
RFC 7230 section 5.5 - Effective Request URI.
Definition: HttpRequest.cc:744
Http::StatusCode status() const
retrieve the status code for this status line
Definition: StatusLine.h:45
Definition: MemBuf.h:24
void consume(mb_size_t sz)
removes sz bytes and "packs" by moving content left
Definition: MemBuf.cc:168
Definition: AsyncJobCalls.h:91
Definition: Range.h:19
static const size_type maxSize
Maximum size of a SBuf. By design it MUST be < MAX(size_type)/2. Currently 256Mb.
Definition: SBuf.h:102
struct SquidConfig::@107 accessList
struct StatCounters::@123::@133 all
struct StatCounters::@123 server
size_t bytesWanted(Range< size_t > const aRange, bool ignoreDelayPool=false) const
Definition: store.cc:212
void replaceHttpReply(const HttpReplyPointer &, const bool andStartWriting=true)
Definition: store.cc:1691
void deferProducer(const AsyncCall::Pointer &producer)
call back producer when more buffer space is available
Definition: store.cc:352
Definition: StoreIOBuffer.h:16
static void purgeEntriesByHeader(HttpRequest *req, const char *reqUrl, Http::Message *rep, Http::HdrType hdr)
Definition: Client.cc:476
void purgeEntriesByUrl(HttpRequest *req, const char *url)
Definition: client_side_reply.cc:862
err_type aclGetDenyInfoPage(AclDenyInfoList **head, const char *name, int redirect_allowed)
Definition: Gadgets.cc:39
void Write(const Comm::ConnectionPointer &conn, const char *buf, int size, AsyncCall::Pointer &callback, FREE *free_func)
Definition: Write.cc:33