mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
BUG/MEDIUM: http-fetch: Don't fetch the method if there is no stream
The "method" sample fetch does not perform any check on the stream existence before using it. However, for errors triggered at the mux level, there is no stream. When the log message is formatted, this sample fetch must fail. It must also fail when it is called from a health-check. This patch must be backported as far as 2.4.
This commit is contained in:
parent
d1d983fb12
commit
12f6dbb863
@ -337,7 +337,7 @@ static int smp_fetch_meth(const struct arg *args, struct sample *smp, const char
|
||||
struct htx *htx;
|
||||
int meth;
|
||||
|
||||
txn = smp->strm->txn;
|
||||
txn = (smp->strm ? smp->strm->txn : NULL);
|
||||
if (!txn)
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user