CLEANUP: httpclient: initialize the client in stage INIT not REGISTER

REGISTER is meant to only assemble static lists, not to initialize
code that may depend on some elements possibly initialized at this
level. For example the init code currently looks up transport protocols
such as XPRT_RAW and XPRT_SSL which ought to be themselves registered
from at REGISTER stage, and which currently work only because they're
still registered directly from a constructor. INIT is perfectly suited
for this level.
This commit is contained in:
Willy Tarreau 2022-02-18 16:23:14 +01:00
parent 18340300da
commit 5b4b6ca823

View File

@ -1045,5 +1045,5 @@ err:
/* initialize the proxy and servers for the HTTP client */
INITCALL0(STG_REGISTER, httpclient_init);
INITCALL0(STG_INIT, httpclient_init);
REGISTER_CONFIG_POSTPARSER("httpclient", httpclient_cfg_postparser);