]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: proxy: unsafe initialization of HTTP transaction when switching from TCP...
authorWilly Tarreau <w@1wt.eu>
Mon, 28 Apr 2014 14:13:51 +0000 (16:13 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 28 Apr 2014 15:24:39 +0000 (17:24 +0200)
commitf767ac55a2b666b70835e621e835f19743d026d1
tree3d4ff320622ec0de6c916681e355ff112e5de11e
parente47e4e238542eb6c4bb635b315596198887e3cf3
BUG/MINOR: proxy: unsafe initialization of HTTP transaction when switching from TCP frontend

A switch from a TCP frontend to an HTTP backend initializes the HTTP
transaction. txn->hdr_idx.size is used by hdr_idx_init() but not
necessarily initialized yet here, because the first call to hdr_idx_init()
is in fact placed in http_init_txn(). Moving it before the call is
enough to fix it. We also remove the useless extra confusing call
to hdr_idx_init().

The bug was introduced in 1.5-dev8 with commit ac1932d ("MEDIUM:
tune.http.maxhdr makes it possible to configure the maximum number
of HTTP headers"). No backport to stable is needed.
src/proxy.c