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.

30 lines
1.2 KiB

  1. commit 02fd3cd55a2232703494ad5c317907aba21783fe
  2. Author: Christopher Faulet <cfaulet@haproxy.com>
  3. Date: Fri Apr 19 15:22:29 2019 +0200
  4. BUG/MINOR: 51d: Get the request channel to call CHECK_HTTP_MESSAGE_FIRST()
  5. Since the commit 89dc49935 ("BUG/MAJOR: http_fetch: Get the channel depending on
  6. the keyword used"), the right channel must be passed as argument when the macro
  7. CHECK_HTTP_MESSAGE_FIRST is called.
  8. This patch must be backported to 1.9.
  9. (cherry picked from commit 2db9dac4c81bbb97b45c9f0ff73ed9fe24a2ba83)
  10. Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
  11. (cherry picked from commit 4fc4c6a9d5effccab3f63909cc86bca452f1be1e)
  12. Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
  13. diff --git a/src/51d.c b/src/51d.c
  14. index 03101136..a0b683b1 100644
  15. --- a/src/51d.c
  16. +++ b/src/51d.c
  17. @@ -384,7 +384,7 @@ static int _51d_fetch(const struct arg *args, struct sample *smp, const char *kw
  18. * Data type has to be reset to ensure the string output is processed
  19. * correctly.
  20. */
  21. - CHECK_HTTP_MESSAGE_FIRST();
  22. + CHECK_HTTP_MESSAGE_FIRST((smp->strm ? &smp->strm->req : NULL));
  23. smp->data.type = SMP_T_STR;
  24. /* Flags the sample to show it uses constant memory*/