BUG/MINOR: fix http-response set-log-level parsing error
hi,
`http-response set-log-level` doesn't work, as the config parsing always set the log level to -1.
From 2b183447c5b37c19aae5d596871fc0b9004c87b4 Mon Sep 17 00:00:00 2001
From: Ruoshan Huang <ruoshan.huang@gmail.com>
Date: Wed, 15 Jun 2016 22:07:58 +0800
Subject: [PATCH] BUG/MINOR: fix http-response set-log-level parsing error
http-response set-log-level can't parse the log level correctly,
as the level argument ptr is one byte ahead when passed to get_log_level
---
src/proto_http.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/proto_http.c b/src/proto_http.c
index 228c90b..78c1ac3 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -9336,7 +9336,7 @@
}
if (strcmp(args[cur_arg], "silent") == 0)
rule->arg.loglevel = -1;
- else if ((rule->arg.loglevel = get_log_level(args[cur_arg] + 1)) == 0)
+ else if ((rule->arg.loglevel = get_log_level(args[cur_arg]) + 1) == 0)
goto bad_log_level;
cur_arg++;
} else if (strcmp(args[0], "add-header") == 0 || strcmp(args[0], "set-header") == 0) {