1 commit 54824cf35520b11ff97e0937beeb429dcdc55fd0
2 Author: Christopher Faulet <cfaulet@haproxy.com>
3 Date: Mon Nov 12 11:57:31 2018 +0100
5 BUG/MINOR: config: Copy default error messages when parsing of a backend starts
7 To be used, error messages declared in a default section must be copied when the
8 parsing of a proxy section starts. But this was only done for frontends.
10 This patch may be backported to older versions.
12 (cherry picked from commit 6b44975fbd2f7d81074e20bc07fc0e01466cc9c9)
13 Signed-off-by: William Lallemand <wlallemand@haproxy.org>
15 diff --git a/src/cfgparse.c b/src/cfgparse.c
16 index 618ffd39..6bc6b259 100644
19 @@ -2787,15 +2787,15 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
20 curproxy->server_id_hdr_name = strdup(defproxy.server_id_hdr_name);
23 + /* initialize error relocations */
24 + for (rc = 0; rc < HTTP_ERR_SIZE; rc++)
25 + chunk_dup(&curproxy->errmsg[rc], &defproxy.errmsg[rc]);
27 if (curproxy->cap & PR_CAP_FE) {
28 curproxy->maxconn = defproxy.maxconn;
29 curproxy->backlog = defproxy.backlog;
30 curproxy->fe_sps_lim = defproxy.fe_sps_lim;
32 - /* initialize error relocations */
33 - for (rc = 0; rc < HTTP_ERR_SIZE; rc++)
34 - chunk_dup(&curproxy->errmsg[rc], &defproxy.errmsg[rc]);
36 curproxy->to_log = defproxy.to_log & ~LW_COOKIE & ~LW_REQHDR & ~ LW_RSPHDR;