]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/format/Token.h
Maintenance: Remove FIXME and \todo labels (#647)
[thirdparty/squid.git] / src / format / Token.h
index 0139f21219dcd05aeb31675f9c900bf6c640f175..77697b7a3d1229fdc7507798b129a30964ecc562 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2017 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.
@@ -10,6 +10,7 @@
 #define _SQUID_FORMAT_TOKEN_H
 
 #include "format/ByteCode.h"
+#include "proxyp/Elements.h"
 
 /*
  * Squid configuration allows users to define custom formats in
@@ -50,6 +51,9 @@ public:
     const char *label;
     struct {
         char *string;
+        // TODO: Add ID caching for protocols other than PROXY protocol.
+        /// the cached ID of the parsed header or zero
+        ProxyProtocol::Two::FieldType headerId;
 
         struct {
             char *header;
@@ -64,7 +68,7 @@ public:
     bool space;
     bool zero;
     int divisor;    // class invariant: MUST NOT be zero.
-    Token *next;    /* todo: move from linked list to array */
+    Token *next;    // TODO: move from linked list to array
 
 private:
     const char *scanForToken(TokenTableEntry const table[], const char *cur);