mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
[BUG] http: the transaction must be initialized even in TCP mode (part 2)
Commit 4605e3b641cebbdbb2ee5726e5bbc3c03a2d7b5e was not enough, because connections passing from a TCP frontend to an HTTP backend without any ACL and via a "default_backend" statement were still working on non-initialized data. An initialization was missing in the session_set_backend() function, next to the initialization of hdr_idx.
This commit is contained in:
parent
d220106092
commit
39e4f62186
@ -34,6 +34,7 @@
|
||||
#include <proto/log.h>
|
||||
#include <proto/protocols.h>
|
||||
#include <proto/proto_tcp.h>
|
||||
#include <proto/proto_http.h>
|
||||
#include <proto/proxy.h>
|
||||
|
||||
|
||||
@ -736,6 +737,10 @@ int session_set_backend(struct session *s, struct proxy *be)
|
||||
if (unlikely(!s->txn.hdr_idx.v && (be->acl_requires & ACL_USE_L7_ANY))) {
|
||||
if ((s->txn.hdr_idx.v = pool_alloc2(s->fe->hdr_idx_pool)) == NULL)
|
||||
return 0; /* not enough memory */
|
||||
|
||||
/* and now initialize the HTTP transaction state */
|
||||
http_init_txn(s);
|
||||
|
||||
s->txn.hdr_idx.size = MAX_HTTP_HDR;
|
||||
hdr_idx_init(&s->txn.hdr_idx);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user