mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
MEDIUM: proto_http: smp_prefetch_http initialize txn
When we call the function smp_prefetch_http(), if the txn is not initialized, it doesn't work. This patch fix this. Now, smp_prefecth_http() permits to use http with any proxy mode.
This commit is contained in:
parent
958f0742a2
commit
ed08d6a9be
@ -10031,10 +10031,12 @@ int smp_prefetch_http(struct proxy *px, struct stream *s, unsigned int opt,
|
|||||||
|
|
||||||
if (!s)
|
if (!s)
|
||||||
return 0;
|
return 0;
|
||||||
|
if (!s->txn) {
|
||||||
|
if (unlikely(!http_alloc_txn(s)))
|
||||||
|
return 0; /* not enough memory */
|
||||||
|
http_init_txn(s);
|
||||||
|
}
|
||||||
txn = s->txn;
|
txn = s->txn;
|
||||||
|
|
||||||
if (!txn)
|
|
||||||
return 0;
|
|
||||||
msg = &txn->req;
|
msg = &txn->req;
|
||||||
|
|
||||||
/* Check for a dependency on a request */
|
/* Check for a dependency on a request */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user