mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
BUG/MINOR: http-fetch: Update method after a prefetch in smp_fetch_meth()
In smp_fetch_meth(), smp_prefetch_htx() function may be called to parse the HTX message and update the HTTP transaction accordingly. In this case, in smp_fetch_metch() and on success, we must update "meth" variable. Otherwise, the variable is still equal to HTTP_METH_OTHER and the string version is always used instead of the enum for known methods. This patch must be backported as far as 2.0.
This commit is contained in:
parent
c06557c23b
commit
eefcd8a97d
@ -346,6 +346,7 @@ static int smp_fetch_meth(const struct arg *args, struct sample *smp, const char
|
|||||||
htx = smp_prefetch_htx(smp, chn, NULL, 1);
|
htx = smp_prefetch_htx(smp, chn, NULL, 1);
|
||||||
if (!htx)
|
if (!htx)
|
||||||
return 0;
|
return 0;
|
||||||
|
meth = txn->meth;
|
||||||
}
|
}
|
||||||
|
|
||||||
smp->data.type = SMP_T_METH;
|
smp->data.type = SMP_T_METH;
|
||||||
|
Loading…
Reference in New Issue
Block a user