You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.4 KiB

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