BUG/MINOR: arg: fix error reporting for add-header/set-header sample fetch arguments

The 'add-header %[samples]' parsing errors associated to http-request
and http-response are displayed with the wrong keyword.

Configuration entry:

   http-request set-header mon-header %[res.hdr(user-agent)]

Original error message:

   [WARNING] 323/150920 (16559) : parsing [haproxy.conf:36] : 'log-format' : sample fetch <res.hdr ...

After commit error message:

   [WARNING] 323/150929 (16580) : parsing [haproxy.conf:36] : 'http-request' : sample fetch <res.hdr ...
This commit is contained in:
Thierry FOURNIER
2013-11-20 15:09:52 +01:00
committed by Willy Tarreau
parent 4a04dc368d
commit 1c0054fe83
4 changed files with 10 additions and 4 deletions

View File

@@ -839,7 +839,8 @@ int smp_resolve_args(struct proxy *p)
case ARGC_STK:where = "in stick rule in"; break;
case ARGC_TRK: where = "in tracking rule in"; break;
case ARGC_LOG: where = "in log-format string in"; break;
case ARGC_HDR: where = "in HTTP header format string in"; break;
case ARGC_HRQ: where = "in http-request header format string in"; break;
case ARGC_HRS: where = "in http-response header format string in"; break;
case ARGC_UIF: where = "in unique-id-format string in"; break;
case ARGC_ACL: ctx = "ACL keyword"; break;
}