From 9fefbd5926bf97855f7bc2c5ed174601a032cced Mon Sep 17 00:00:00 2001 From: Thierry FOURNIER Date: Sun, 11 May 2014 15:15:00 +0200 Subject: [PATCH] MINOR: acl: set "str" as default match for strings It appears than many people considers that the default match for a fetch returning string is "exact match string" aka "str". This patch set this match as default for strings. --- src/acl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/acl.c b/src/acl.c index 7d1736ef92..69da28d7e9 100644 --- a/src/acl.c +++ b/src/acl.c @@ -415,6 +415,14 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list * expr->pat.prune = pat_prune_fcts[PAT_MATCH_IP]; expr->pat.expect_type = pat_match_types[PAT_MATCH_IP]; break; + case SMP_T_STR: + expr->pat.parse = pat_parse_fcts[PAT_MATCH_STR]; + expr->pat.index = pat_index_fcts[PAT_MATCH_STR]; + expr->pat.match = pat_match_fcts[PAT_MATCH_STR]; + expr->pat.delete = pat_delete_fcts[PAT_MATCH_STR]; + expr->pat.prune = pat_prune_fcts[PAT_MATCH_STR]; + expr->pat.expect_type = pat_match_types[PAT_MATCH_STR]; + break; } }