mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
[BUG] http: the transaction must be initialized even in TCP mode
When running in pure TCP mode with a traffic inspection rule to detect HTTP protocol, we have to initialize the HTTP transaction too. The effect of not doing this was that some incoming connections could have been matched as carrying HTTP protocol eventhough this was not the case.
This commit is contained in:
parent
d45b3d5aff
commit
a3445fce16
@ -301,10 +301,10 @@ int event_accept(int fd) {
|
|||||||
|
|
||||||
if ((txn->hdr_idx.v = pool_alloc2(p->hdr_idx_pool)) == NULL)
|
if ((txn->hdr_idx.v = pool_alloc2(p->hdr_idx_pool)) == NULL)
|
||||||
goto out_fail_idx; /* no memory */
|
goto out_fail_idx; /* no memory */
|
||||||
}
|
|
||||||
|
|
||||||
if (p->mode == PR_MODE_HTTP)
|
/* and now initialize the HTTP transaction state */
|
||||||
http_init_txn(s);
|
http_init_txn(s);
|
||||||
|
}
|
||||||
|
|
||||||
if ((p->mode == PR_MODE_TCP || p->mode == PR_MODE_HTTP)
|
if ((p->mode == PR_MODE_TCP || p->mode == PR_MODE_HTTP)
|
||||||
&& (p->logfac1 >= 0 || p->logfac2 >= 0)) {
|
&& (p->logfac1 >= 0 || p->logfac2 >= 0)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user