CLEANUP: http_ana: Remove unused TXN flags
TX_CLDENY, TX_CLALLOW, TX_SVDENY and TX_SVALLOW flags are unused. Only
TX_CLTARPIT is used to make the difference between an http deny rule and an http
tarpit rule. So these unused flags are removed.
diff --git a/contrib/debug/flags.c b/contrib/debug/flags.c
index ca7584e..f38378f 100644
--- a/contrib/debug/flags.c
+++ b/contrib/debug/flags.c
@@ -323,10 +323,6 @@
}
SHOW_FLAG(f, TX_CLTARPIT);
- SHOW_FLAG(f, TX_SVALLOW);
- SHOW_FLAG(f, TX_SVDENY);
- SHOW_FLAG(f, TX_CLALLOW);
- SHOW_FLAG(f, TX_CLDENY);
if (f) {
printf("EXTRA(0x%08x)", f);
diff --git a/include/types/http_ana.h b/include/types/http_ana.h
index 6740c03..764ebc2 100644
--- a/include/types/http_ana.h
+++ b/include/types/http_ana.h
@@ -30,10 +30,7 @@
/* These are the flags that are found in txn->flags */
/* action flags */
-#define TX_CLDENY 0x00000001 /* a client header matches a deny regex */
-#define TX_CLALLOW 0x00000002 /* a client header matches an allow regex */
-#define TX_SVDENY 0x00000004 /* a server header matches a deny regex */
-#define TX_SVALLOW 0x00000008 /* a server header matches an allow regex */
+/* Unusued: 0x00000001..0x00000008 */
#define TX_CLTARPIT 0x00000010 /* the transaction is tarpitted (anti-dos) */
/* transaction flags dedicated to cookies : bits values 0x20 to 0x80 (0-7 shift 5) */
diff --git a/src/http_ana.c b/src/http_ana.c
index 5492b54..7fd371e 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -2886,7 +2886,6 @@
rule_ret = HTTP_RULE_RES_DONE;
goto end;
case ACT_RET_DENY:
- txn->flags |= TX_CLDENY;
if (txn->status == -1)
txn->status = 403;
rule_ret = HTTP_RULE_RES_DENY;
@@ -2908,7 +2907,6 @@
goto end;
case ACT_ACTION_DENY:
- txn->flags |= TX_CLDENY;
txn->status = rule->arg.http_deny.status;
if (rule->arg.http_deny.errmsg)
txn->errmsg = rule->arg.http_deny.errmsg;
@@ -2992,9 +2990,8 @@
* is returned, the process can continue the evaluation of next rule list. If
* *STOP or *DONE is returned, the process must stop the evaluation. If *BADREQ
* is returned, it means the operation could not be processed and a server error
- * must be returned. It may set the TX_SVDENY on txn->flags if it encounters a
- * deny rule. If *YIELD is returned, the caller must call again the function
- * with the same context.
+ * must be returned. If *YIELD is returned, the caller must call again the
+ * function with the same context.
*/
static enum rule_result http_res_get_intercept_rule(struct proxy *px, struct list *rules,
struct stream *s)
@@ -3067,7 +3064,6 @@
rule_ret = HTTP_RULE_RES_DONE;
goto end;
case ACT_RET_DENY:
- txn->flags |= TX_CLDENY;
if (txn->status == -1)
txn->status = 502;
rule_ret = HTTP_RULE_RES_DENY;
@@ -3089,7 +3085,6 @@
goto end;
case ACT_ACTION_DENY:
- txn->flags |= TX_CLDENY;
txn->status = rule->arg.http_deny.status;
if (rule->arg.http_deny.errmsg)
txn->errmsg = rule->arg.http_deny.errmsg;