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>
This commit is contained in:
Godbach 2014-12-18 15:44:58 +08:00 committed by Willy Tarreau
parent 1f1fae6202
commit d972203fbc
2 changed files with 2 additions and 2 deletions

View 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;

View 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,