]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: proxy/http_ext: implement dynamic http_ext
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 9 Jan 2023 10:09:03 +0000 (11:09 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 27 Jan 2023 14:18:59 +0000 (15:18 +0100)
commitb2e2ec51b36f99369c1f32cbdf4698cdb9b18264
treeb12f4a4f88771cc161d85b7161d8b5824b5534cd
parentd745a3f117783fb4aa4bcdf62a0a18e589520574
MEDIUM: proxy/http_ext: implement dynamic http_ext

proxy http-only options implemented in http_ext were statically stored
within proxy struct.

We're making some changes so that http_ext are now stored in a dynamically
allocated structs.
http_ext related structs are only allocated when needed to save some space
whenever possible, and they are automatically freed upon proxy deletion.

Related PX_O_HTTP{7239,XFF,XOT) option flags were removed because we're now
considering an http_ext option as 'active' if it is allocated (ptr is not NULL)

A few checks (and BUG_ON) were added to make these changes safe because
it adds some (acceptable) complexity to the previous design.

Also, proxy.http was renamed to proxy.http_ext to make things more explicit.
include/haproxy/http_ext-t.h
include/haproxy/http_ext.h
include/haproxy/proxy-t.h
src/cfgparse-listen.c
src/cfgparse.c
src/http_ana.c
src/http_ext.c
src/proxy.c