From e13ee703d2b21c85eb1587af618aced3daf9fbeb Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 15 Mar 2021 17:08:08 +0100 Subject: [PATCH] MINOR: frontend: Create HTTP txn for HTX streams When an HTX stream is created, be sure to always create the HTTP txn object, regardless of the ".http_needed" value of the frontend. That happens when a destructive HTTP upgrades is performed (TCP>H2). The frontend is a TCP proxy. If there is no dependency on the HTTP part, the HTTP transaction is not created at this stage but only when the backend is set. For now, it is not a problem. But an HTTP txn will be mandatory to fully support TCP to HTTP upgrades after frontend tcp-request rules evaluation. --- src/frontend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend.c b/src/frontend.c index 1be5a0fb0..93c8a8637 100644 --- a/src/frontend.c +++ b/src/frontend.c @@ -145,7 +145,7 @@ int frontend_accept(struct stream *s) goto out_free_reqcap; /* no memory */ } - if (fe->http_needed) { + if (fe->http_needed || IS_HTX_STRM(s)) { /* we have to allocate header indexes only if we know * that we may make use of them. This of course includes * (mode == PR_MODE_HTTP).