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