#include <Context.h>

Inheritance diagram for ESIContext:
Collaboration diagram for ESIContext:

Classes

class  ParserState
 

Public Types

enum  esiKick_t {
  ESI_KICK_FAILED ,
  ESI_KICK_PENDING ,
  ESI_KICK_SENT ,
  ESI_KICK_INPROGRESS
}
 
typedef RefCount< ESIContextPointer
 

Public Member Functions

 ESIContext ()
 
 ~ESIContext () override
 
void provideData (ESISegment::Pointer, ESIElement *source) override
 
void fail (ESIElement *source, char const *anError=nullptr) override
 
void startRead ()
 
void finishRead ()
 
bool reading () const
 
void setError ()
 
void setErrorMessage (char const *)
 
void addStackElement (ESIElement::Pointer element)
 
void addLiteral (const char *s, int len)
 
void finishChildren ()
 
esiKick_t kick ()
 
bool failed () const
 

Public Attributes

clientStreamNodethisNode
 
ClientHttpRequesthttp
 
struct {
   unsigned int   passthrough:1
 
   unsigned int   oktosend:1
 
   unsigned int   finished:1
 
   unsigned int   error:1
 
   unsigned int   finishedtemplate:1
 
   unsigned int   clientwantsdata:1
 
   unsigned int   kicked:1
 
   unsigned int   detached:1
 
flags
 
err_type errorpage
 
Http::StatusCode errorstatus
 
char * errormessage
 
HttpReplyPointer rep
 
ESISegment::Pointer buffered
 
ESISegment::Pointer incoming
 
ESISegment::Pointer outbound
 
ESISegment::Pointer outboundtail
 
size_t outbound_offset
 
int64_t readpos
 
int64_t pos
 
class ESIContext::ParserState parserState
 
ESIVarStatevarState
 
ESIElement::Pointer tree
 
RefCount< ESIContextcbdataLocker
 
bool cachedASTInUse
 

Private Member Functions

 CBDATA_CLASS (ESIContext)
 
void fail ()
 
void freeResources ()
 
void fixupOutboundTail ()
 
void trimBlanks ()
 
size_t send ()
 
void appendOutboundData (ESISegment::Pointer theData)
 
esiProcessResult_t process ()
 
void parse ()
 
void parseOneBuffer ()
 
void updateCachedAST ()
 
bool hasCachedAST () const
 
void getCachedAST ()
 
void start (const char *el, const char **attr, size_t attrCount) override
 
void end (const char *el) override
 
void parserDefault (const char *s, int len) override
 
void parserComment (const char *s) override
 

Private Attributes

bool reading_
 
bool processing
 

Detailed Description

Definition at line 26 of file Context.h.

Member Typedef Documentation

◆ Pointer

Definition at line 31 of file Context.h.

Member Enumeration Documentation

◆ esiKick_t

Enumerator
ESI_KICK_FAILED 
ESI_KICK_PENDING 
ESI_KICK_SENT 
ESI_KICK_INPROGRESS 

Definition at line 51 of file Context.h.

Constructor & Destructor Documentation

◆ ESIContext()

ESIContext::ESIContext ( )
inline

Definition at line 32 of file Context.h.

References flags.

◆ ~ESIContext()

ESIContext::~ESIContext ( )
override

Definition at line 813 of file Esi.cc.

References debugs, errormessage, freeResources(), and safe_free.

Member Function Documentation

◆ addLiteral()

void ESIContext::addLiteral ( const char *  s,
int  len 
)

◆ addStackElement()

◆ appendOutboundData()

void ESIContext::appendOutboundData ( ESISegment::Pointer  theData)
private

Definition at line 254 of file Esi.cc.

References assert, debugs, fixupOutboundTail(), RefCount< C >::getRaw(), ESISegment::next, outbound, and outboundtail.

Referenced by fail(), and provideData().

◆ CBDATA_CLASS()

ESIContext::CBDATA_CLASS ( ESIContext  )
private

◆ end()

◆ fail() [1/2]

◆ fail() [2/2]

void ESIContext::fail ( ESIElement source,
char const *  anError = nullptr 
)
overridevirtual

Reimplemented from esiTreeParent.

Definition at line 283 of file Esi.cc.

References fail(), send(), setError(), and setErrorMessage().

◆ failed()

bool ESIContext::failed ( ) const
inline

Definition at line 139 of file Context.h.

References flags.

Referenced by addStackElement(), parserComment(), parserDefault(), and start().

◆ finishChildren()

void ESIContext::finishChildren ( )

Definition at line 625 of file Esi.cc.

References ESIElement::finish(), RefCount< C >::getRaw(), and tree.

Referenced by esiStreamDetach(), freeResources(), and process().

◆ finishRead()

void ESIContext::finishRead ( )

Definition at line 227 of file Esi.cc.

References assert, and reading_.

Referenced by esiProcessStream().

◆ fixupOutboundTail()

void ESIContext::fixupOutboundTail ( )
private

Definition at line 292 of file Esi.cc.

References RefCount< C >::getRaw(), outboundtail, and ESISegment::tail().

Referenced by appendOutboundData(), and kick().

◆ freeResources()

◆ getCachedAST()

◆ hasCachedAST()

bool ESIContext::hasCachedAST ( ) const
private

◆ kick()

◆ parse()

◆ parseOneBuffer()

◆ parserComment()

void ESIContext::parserComment ( const char *  s)
overrideprivatevirtual

◆ parserDefault()

void ESIContext::parserDefault ( const char *  s,
int  len 
)
overrideprivatevirtual

Implements ESIParserClient.

Definition at line 1126 of file Esi.cc.

References addLiteral(), and failed().

◆ process()

◆ provideData()

void ESIContext::provideData ( ESISegment::Pointer  theData,
ESIElement source 
)
overridevirtual

Reimplemented from esiTreeParent.

Definition at line 269 of file Esi.cc.

References appendOutboundData(), assert, debugs, RefCount< C >::getRaw(), processing, send(), tree, and trimBlanks().

◆ reading()

bool ESIContext::reading ( ) const

Definition at line 233 of file Esi.cc.

References reading_.

Referenced by esiProcessStream(), and esiStreamRead().

◆ send()

◆ setError()

void ESIContext::setError ( )

Definition at line 246 of file Esi.cc.

References ERR_ESI, errorpage, errorstatus, flags, and Http::scInternalServerError.

Referenced by fail(), parse(), parseOneBuffer(), parserComment(), and process().

◆ setErrorMessage()

void ESIContext::setErrorMessage ( char const *  anError)

Definition at line 86 of file Context.cc.

References errormessage, and xstrdup.

Referenced by fail(), parse(), parseOneBuffer(), parserComment(), and process().

◆ start()

◆ startRead()

void ESIContext::startRead ( )

Definition at line 221 of file Esi.cc.

References assert, and reading_.

Referenced by esiProcessStream(), and esiStreamRead().

◆ trimBlanks()

void ESIContext::trimBlanks ( )
private

Definition at line 519 of file Esi.cc.

References assert, debugs, RefCount< C >::getRaw(), ESISegment::len, ESISegment::next, outbound, and outboundtail.

Referenced by provideData(), and send().

◆ updateCachedAST()

void ESIContext::updateCachedAST ( )
private

Member Data Documentation

◆ buffered

ESISegment::Pointer ESIContext::buffered

Definition at line 99 of file Context.h.

Referenced by esiProcessStream(), esiStreamRead(), freeResources(), parse(), parseOneBuffer(), and process().

◆ cachedASTInUse

bool ESIContext::cachedASTInUse

Definition at line 141 of file Context.h.

Referenced by esiProcessStream(), esiStreamRead(), getCachedAST(), and process().

◆ cbdataLocker

RefCount<ESIContext> ESIContext::cbdataLocker

Definition at line 138 of file Context.h.

Referenced by ESIContextNew(), and esiStreamDetach().

◆ clientwantsdata

unsigned int ESIContext::clientwantsdata

Definition at line 90 of file Context.h.

Referenced by ESIContextNew(), and esiStreamRead().

◆ detached

unsigned int ESIContext::detached

Definition at line 92 of file Context.h.

Referenced by esiStreamDetach().

◆ error

unsigned int ESIContext::error

Definition at line 87 of file Context.h.

◆ errormessage

char* ESIContext::errormessage

Definition at line 97 of file Context.h.

Referenced by ~ESIContext(), fail(), and setErrorMessage().

◆ errorpage

err_type ESIContext::errorpage

Definition at line 95 of file Context.h.

Referenced by fail(), and setError().

◆ errorstatus

Http::StatusCode ESIContext::errorstatus

Definition at line 96 of file Context.h.

Referenced by fail(), and setError().

◆ finished

unsigned int ESIContext::finished

Definition at line 81 of file Context.h.

Referenced by esiStreamRead(), and esiStreamStatus().

◆ finishedtemplate

unsigned int ESIContext::finishedtemplate

Definition at line 89 of file Context.h.

Referenced by esiProcessStream(), and esiStreamRead().

◆ 

◆ http

ClientHttpRequest* ESIContext::http

Definition at line 76 of file Context.h.

Referenced by ESIContextNew(), fail(), getCachedAST(), hasCachedAST(), send(), and updateCachedAST().

◆ incoming

ESISegment::Pointer ESIContext::incoming

Definition at line 100 of file Context.h.

Referenced by esiProcessStream(), esiStreamRead(), parse(), and process().

◆ kicked

unsigned int ESIContext::kicked

Definition at line 91 of file Context.h.

◆ oktosend

unsigned int ESIContext::oktosend

Definition at line 80 of file Context.h.

Referenced by esiStreamRead(), and esiStreamStatus().

◆ outbound

ESISegment::Pointer ESIContext::outbound

◆ outbound_offset

size_t ESIContext::outbound_offset

Definition at line 110 of file Context.h.

Referenced by esiStreamStatus(), fail(), and send().

◆ outboundtail

ESISegment::Pointer ESIContext::outboundtail

◆ parserState

◆ passthrough

unsigned int ESIContext::passthrough

Definition at line 79 of file Context.h.

Referenced by ESIContextNew(), esiProcessStream(), esiStreamRead(), and esiStreamStatus().

◆ pos

int64_t ESIContext::pos

Definition at line 112 of file Context.h.

Referenced by fail(), kick(), and send().

◆ processing

bool ESIContext::processing
private

Definition at line 161 of file Context.h.

Referenced by process(), and provideData().

◆ reading_

bool ESIContext::reading_
private

Definition at line 149 of file Context.h.

Referenced by finishRead(), reading(), and startRead().

◆ readpos

int64_t ESIContext::readpos

Definition at line 111 of file Context.h.

Referenced by esiProcessStream(), and esiStreamRead().

◆ rep

HttpReplyPointer ESIContext::rep

Definition at line 98 of file Context.h.

Referenced by ESIContextNew(), fail(), freeResources(), parse(), and send().

◆ thisNode

clientStreamNode* ESIContext::thisNode

Definition at line 72 of file Context.h.

Referenced by ESIContextNew(), esiStreamDetach(), and send().

◆ tree

◆ varState


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors