BUG/MINOR: parse: refer curproxy instead of proxy
Since during parsing stage, curproxy always represents a proxy to be operated,
it should be a mistake by referring proxy.
Signed-off-by: Godbach <nylzhaowei@gmail.com>
(cherry picked from commit d972203fbc3aab527cbd73ede70f9d9b35ecb809)
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 40d20ab..7dda643 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -6601,7 +6601,7 @@
curproxy->conf.args.file = curproxy->conf.uif_file;
curproxy->conf.args.line = curproxy->conf.uif_line;
parse_logformat_string(curproxy->conf.uniqueid_format_string, curproxy, &curproxy->format_unique_id, LOG_OPT_HTTP,
- (proxy->cap & PR_CAP_FE) ? SMP_VAL_FE_HRQ_HDR : SMP_VAL_BE_HRQ_HDR,
+ (curproxy->cap & PR_CAP_FE) ? SMP_VAL_FE_HRQ_HDR : SMP_VAL_BE_HRQ_HDR,
curproxy->conf.uif_file, curproxy->conf.uif_line);
curproxy->conf.args.file = NULL;
curproxy->conf.args.line = 0;
diff --git a/src/proto_http.c b/src/proto_http.c
index 44822e3..8264b73 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -9611,7 +9611,7 @@
* if prefix == "/", we don't want to add anything, otherwise it
* makes it hard for the user to configure a self-redirection.
*/
- proxy->conf.args.ctx = ARGC_RDR;
+ curproxy->conf.args.ctx = ARGC_RDR;
if (!(type == REDIRECT_TYPE_PREFIX && destination[0] == '/' && destination[1] == '\0')) {
parse_logformat_string(destination, curproxy, &rule->rdr_fmt, LOG_OPT_HTTP,
(curproxy->cap & PR_CAP_FE) ? SMP_VAL_FE_HRQ_HDR : SMP_VAL_BE_HRQ_HDR,