]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/esi/Context.h
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / esi / Context.h
index d9091ec4b97b7f758a71861ccf1861d1083361ce..f3281a18dd5c88f7595d66e3901d6a0baca7b65b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -13,6 +13,7 @@
 #include "err_type.h"
 #include "esi/Element.h"
 #include "esi/Parser.h"
+#include "http/forward.h"
 #include "http/StatusCode.h"
 
 class ESIVarState;
@@ -27,19 +28,19 @@ class ESIContext : public esiTreeParent, public ESIParserClient
 public:
     typedef RefCount<ESIContext> Pointer;
     ESIContext() :
-            thisNode(NULL),
-            http(NULL),
-            errorpage(ERR_NONE),
-            errorstatus(Http::scNone),
-            errormessage(NULL),
-            rep(NULL),
-            outbound_offset(0),
-            readpos(0),
-            pos(0),
-            varState(NULL),
-            cachedASTInUse(false),
-            reading_(true),
-            processing(false) {
+        thisNode(NULL),
+        http(NULL),
+        errorpage(ERR_NONE),
+        errorstatus(Http::scNone),
+        errormessage(NULL),
+        rep(NULL),
+        outbound_offset(0),
+        readpos(0),
+        pos(0),
+        varState(NULL),
+        cachedASTInUse(false),
+        reading_(true),
+        processing(false) {
         memset(&flags, 0, sizeof(flags));
     }
 
@@ -77,7 +78,7 @@ public:
         int oktosend:1;
         int finished:1;
 
-        /* an error has occured, send full body replies
+        /* an error has occurred, send full body replies
          * regardless. Note that we don't fail midstream
          * because we buffer until we can not fail
          */
@@ -92,7 +93,7 @@ public:
     err_type errorpage; /* if we error what page to use */
     Http::StatusCode errorstatus; /* if we error, what code to return */
     char *errormessage; /* error to pass to error page */
-    HttpReply *rep; /* buffered until we pass data downstream */
+    HttpReplyPointer rep; /* buffered until we pass data downstream */
     ESISegment::Pointer buffered; /* unprocessed data - for whatever reason */
     ESISegment::Pointer incoming;
     /* processed data we are waiting to send, or for
@@ -159,3 +160,4 @@ private:
 };
 
 #endif /* SQUID_ESICONTEXT_H */
+