]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: parse: refer curproxy instead of proxy
authorGodbach <nylzhaowei@gmail.com>
Thu, 18 Dec 2014 07:44:58 +0000 (15:44 +0800)
committerWilly Tarreau <w@1wt.eu>
Thu, 18 Dec 2014 10:01:51 +0000 (11:01 +0100)
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>
src/cfgparse.c
src/proto_http.c

index c8b15467f7fe61c6aac58912d5ebc87cdbf0b222..3e345e48c0e0f008d1e89e8055280bb173ccf708 100644 (file)
@@ -6779,7 +6779,7 @@ out_uri_auth_compat:
                        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;
index 0a94785b069310e578f1241f59a043c40b830f56..3fffc5bb461782b85346269357304d5dc7d86f27 100644 (file)
@@ -9691,7 +9691,7 @@ struct redirect_rule *http_parse_redirect_rule(const char *file, int linenum, st
                 * 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,