Include.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9/* DEBUG: section 86 ESI processing */
10
11#ifndef SQUID_ESIINCLUDE_H
12#define SQUID_ESIINCLUDE_H
13
14#include "esi/Context.h"
15#include "esi/Element.h"
16#include "esi/Segment.h"
17#include "HttpHeader.h"
18
19class ESIInclude;
21
23{
25
26public:
29 ~ESIStreamContext() override;
30 void freeResources();
35};
36
37class ESIInclude : public ESIElement
38{
40
41public:
42 ESIInclude(esiTreeParentPtr, int attributes, const char **attr, ESIContext *);
43 ~ESIInclude() override;
44 void render(ESISegment::Pointer) override;
45 esiProcessResult_t process (int dovars) override;
46 Pointer makeCacheable() const override;
49
50 struct {
51 unsigned int onerrorcontinue:1; /* on error return zero data */
52 unsigned int failed:1; /* Failed to process completely */
53 unsigned int finished:1; /* Finished getting subrequest data */
60 char *srcurl, *alturl;
62 void finish() override;
63
64private:
65 void Start (ESIStreamContext::Pointer, char const *, ESIVarState *);
67 void start();
68 bool started;
69 bool sent;
70 ESIInclude(ESIInclude const &);
71 bool dataNeeded() const;
72 void prepareRequestHeaders(HttpHeader &tempheaders, ESIVarState *vars);
73};
74
75#endif /* SQUID_ESIINCLUDE_H */
76
esiProcessResult_t
Definition: Element.h:18
RefCount< ESIInclude > ESIIncludePtr
Definition: Include.h:20
#define RefCountable
The locking interface for use on Reference-Counted classes.
Definition: Lock.h:66
unsigned int finished
Definition: Include.h:53
void prepareRequestHeaders(HttpHeader &tempheaders, ESIVarState *vars)
Definition: Include.cc:262
void includeFail(ESIStreamContext::Pointer)
Definition: Include.cc:423
MEMPROXY_CLASS(ESIInclude)
struct ESIInclude::@59 flags
unsigned int failed
Definition: Include.h:52
~ESIInclude() override
Definition: Include.cc:204
void render(ESISegment::Pointer) override
Definition: Include.cc:365
ESISegment::Pointer srccontent
Definition: Include.h:57
ESIVarState * varState
Definition: Include.h:59
ESISegment::Pointer altcontent
Definition: Include.h:58
Pointer makeCacheable() const override
Definition: Include.cc:221
esiTreeParentPtr parent
Definition: Include.h:66
void finish() override
Definition: Include.cc:215
ESIStreamContext::Pointer alt
Definition: Include.h:56
bool started
Definition: Include.h:68
void subRequestDone(ESIStreamContext::Pointer, bool)
Definition: Include.cc:435
char * alturl
Definition: Include.h:60
bool dataNeeded() const
Definition: Include.cc:429
ESIStreamContext::Pointer src
Definition: Include.h:55
void Start(ESIStreamContext::Pointer, char const *, ESIVarState *)
Definition: Include.cc:269
bool sent
Definition: Include.h:69
esiProcessResult_t process(int dovars) override
Definition: Include.cc:398
unsigned int onerrorcontinue
Definition: Include.h:51
ESIInclude(esiTreeParentPtr, int attributes, const char **attr, ESIContext *)
Definition: Include.cc:293
char * srcurl
Definition: Include.h:60
Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override
Definition: Include.cc:227
void start()
Definition: Include.cc:342
ESISegment::Pointer buffer
Definition: Include.h:34
CBDATA_CLASS(ESIStreamContext)
ESIStreamContext()
Definition: Esi.cc:238
ESISegment::Pointer localbuffer
Definition: Include.h:33
ESIIncludePtr include
Definition: Include.h:32
RefCount< ESIStreamContext > Pointer
Definition: Include.h:27
void freeResources()
Definition: Include.cc:187
~ESIStreamContext() override
Definition: Include.cc:181

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors