Esi.cc
Go to the documentation of this file.
238ESIStreamContext::ESIStreamContext() : finished(false), include (nullptr), localbuffer (new ESISegment), buffer (nullptr)
498 case Http::scContinue: /* Should never reach us... but squid needs to alter to accommodate this */
669esiProcessStream (clientStreamNode *thisNode, ClientHttpRequest *http, HttpReply *rep, StoreIOBuffer receivedData)
719 debugs (86,5, "esiProcessStream found " << receivedData.length << " bytes of body data at offset " << receivedData.offset);
770 if (rep == nullptr && receivedData.data == nullptr && receivedData.length == 0 && !context->flags.finishedtemplate) {
955 debugs(86, 5, "ESIContext::Start: element '" << el << "' with " << specifiedattcount << " tags");
1150 debugs(86, DBG_CRITICAL, "ERROR: ESIContext::parserComment: Parsing fragment '" << s + 3 << "' failed.");
1406ErrorState *clientBuildError(err_type, Http::StatusCode, char const *, const ConnStateData *, HttpRequest *, const AccessLogEntryPointer &);
1424 const auto err = clientBuildError(errorpage, errorstatus, nullptr, http->getConn(), http->request, http->al);
1437 errorprogress += outboundtail->append(rep->body.content() + errorprogress, rep->body.contentSize() - errorprogress);
1671 debugs(86, DBG_IMPORTANT, "ERROR: esiTryAdd: Failed for " << this << " - try already has an attempt node (section 3.4)");
1681 debugs(86, DBG_IMPORTANT, "ERROR: esiTryAdd: Failed for " << this << " - try already has an except node (section 3.4)");
1689 debugs(86, DBG_IMPORTANT, "ERROR: esiTryAdd: Failed to add element " << element.getRaw() << " to try " << this << ", incorrect element type (see section 3.4)");
1708 debugs(86, DBG_CRITICAL, "ERROR: esiTryProcess: Try has no attempt element - ESI template is invalid (section 3.4)");
1713 debugs(86, DBG_CRITICAL, "ERROR: esiTryProcess: Try has no except element - ESI template is invalid (section 3.4)");
1798 debugs(86, 5, "esiTry::fail: this=" << this << ", source=" << source << ", message=" << anError);
1924 if (!(dynamic_cast<esiWhen*>(element.getRaw()) || dynamic_cast<esiOtherwise*>(element.getRaw()))) {
1925 debugs(86, DBG_CRITICAL, "ERROR: esiChooseAdd: invalid child node for esi:choose (section 3.3)");
1931 debugs(86, DBG_CRITICAL, "esiChooseAdd: only one otherwise node allowed for esi:choose (section 3.3)");
1978 debugs(86, 5, "setting index " << pos << ", pointer " << (void*)element.getRaw() << " to nil");
2089esiChoose::esiChoose(esiChoose const &old) : chosenelement(-1), otherwise (nullptr), parent (nullptr)
2150esiWhen::esiWhen(esiTreeParentPtr aParent, int attrcount, const char **attr,ESIVarState *aVar) :
void esiStreamRead(clientStreamNode *thisNode, ClientHttpRequest *http)
Definition: Esi.cc:373
void esiStreamDetach(clientStreamNode *thisNode, ClientHttpRequest *http)
Definition: Esi.cc:635
static bool operator==(ESIElement const *lhs, ESIElement::Pointer const &rhs)
Definition: Esi.cc:78
ErrorState * clientBuildError(err_type, Http::StatusCode, char const *, const ConnStateData *, HttpRequest *, const AccessLogEntryPointer &)
Definition: client_side_reply.cc:2134
CBDATA_CLASS_INIT(ESIContext)
clientStream_status_t esiStreamStatus(clientStreamNode *thisNode, ClientHttpRequest *http)
Definition: Esi.cc:466
static ESIContext * ESIContextNew(HttpReply *, clientStreamNode *, ClientHttpRequest *)
Definition: Esi.cc:822
void esiProcessStream(clientStreamNode *thisNode, ClientHttpRequest *http, HttpReply *rep, StoreIOBuffer receivedData)
Definition: Esi.cc:669
std::ostream & CurrentException(std::ostream &os)
prints active (i.e., thrown but not yet handled) exception
Definition: TextException.cc:88
Definition: client_side_request.h:38
Definition: client_side.h:84
Definition: Assign.h:33
ESIElement::Pointer stack[ESI_STACK_DEPTH_LIMIT]
Definition: Context.h:118
Definition: Context.h:27
struct ESIContext::@57 flags
class ESIContext::ParserState parserState
void appendOutboundData(ESISegment::Pointer theData)
Definition: Esi.cc:254
void start(const char *el, const char **attr, size_t attrCount) override
Definition: Esi.cc:945
void provideData(ESISegment::Pointer, ESIElement *source) override
Definition: Esi.cc:269
Definition: Element.h:43
virtual void render(ESISegment::Pointer)=0
virtual void finish()=0
static ESIElementType_t IdentifyElement(const char *)
Definition: Esi.cc:852
virtual Pointer makeCacheable() const =0
virtual Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const =0
Definition: Include.h:38
Definition: Parser.h:17
virtual bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream)=0
virtual long int lineNumber() const =0
virtual char const * errorString() const =0
Definition: Segment.h:22
static void ListTransfer(Pointer &from, Pointer &to)
Definition: Segment.cc:53
Definition: Include.h:23
Definition: VarState.h:35
Definition: errorpage.h:89
Counts events, forgetting old ones. Useful for "3 errors/minute" limits.
Definition: FadingCounter.h:16
Definition: HttpHdrScTarget.h:25
HttpHdrScTarget * getMergedTarget(const char *ourtarget)
Definition: HttpHdrSc.cc:294
Definition: HttpHeader.h:75
Definition: HttpReply.h:25
Definition: HttpRequest.h:49
Http::StatusCode status() const
retrieve the status code for this status line
Definition: StatusLine.h:45
struct SquidConfig::@100 Accel
Definition: StoreIOBuffer.h:16
Definition: clientStream.h:76
Definition: Esi.cc:162
void makeCachableElements(esiChoose const &old)
Definition: Esi.cc:2100
Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override
Definition: Esi.cc:2135
MEMPROXY_CLASS(esiChoose)
void provideData(ESISegment::Pointer data, ESIElement *source) override
Definition: Esi.cc:2083
void makeUsableElements(esiChoose const &old, ESIVarState &)
Definition: Esi.cc:2111
void checkValidSource(ESIElement::Pointer source) const
Definition: Esi.cc:2053
Definition: Esi.cc:88
Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override
Definition: Esi.cc:1481
MEMPROXY_CLASS(esiComment)
Definition: Except.h:20
Definition: Literal.h:19
Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override
Definition: Esi.cc:1580
struct esiLiteral::@60 flags
Definition: Esi.cc:110
MEMPROXY_CLASS(esiRemove)
Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override
Definition: Esi.cc:1616
Definition: Sequence.h:20
void makeUsableElements(esiSequence const &old, ESIVarState &)
Definition: Sequence.cc:347
Definition: Esi.cc:125
MEMPROXY_CLASS(esiTry)
struct esiTry::@58 flags
void provideData(ESISegment::Pointer data, ESIElement *source) override
Definition: Esi.cc:1810
Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override
Definition: Esi.cc:1852
Definition: Esi.cc:194
Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override
Definition: Esi.cc:2226
esiWhen(esiTreeParentPtr aParent, int attributes, const char **attr, ESIVarState *)
Definition: Esi.cc:2150
MEMPROXY_CLASS(esiWhen)
void clientStreamCallback(clientStreamNode *thisObject, ClientHttpRequest *http, HttpReply *rep, StoreIOBuffer replyBuffer)
Definition: clientStream.cc:150
clientStream_status_t clientStreamStatus(clientStreamNode *thisObject, ClientHttpRequest *http)
Definition: clientStream.cc:257
void clientStreamRead(clientStreamNode *thisObject, ClientHttpRequest *http, StoreIOBuffer readBuffer)
Definition: clientStream.cc:170
void clientStreamDetach(clientStreamNode *thisObject, ClientHttpRequest *http)
Definition: clientStream.cc:192
Esi::ErrorDetail Error(const char *msg)
prepare an Esi::ErrorDetail for throw on ESI parser internal errors
Definition: Esi.h:31
Definition: Attempt.h:17
Definition: Esi.cc:215
virtual void provideData(ESISegment::Pointer, ESIElement *)
Definition: Element.h:28