From: Christopher Faulet Date: Wed, 16 Sep 2026 07:19:21 +0000 (+0200) Subject: BUG/MEDIUM: acme: Set HTTPCLIENT_O_RES_ACCUM option on the http-client X-Git-Tag: v3.5-dev8~184 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=37b48cb0923e4a5b413eac3fd52328acc6493d53;p=haproxy.git BUG/MEDIUM: acme: Set HTTPCLIENT_O_RES_ACCUM option on the http-client The ACME task does not consume the response payload on the fly. It waits for the end of the response to parse the JSON object stored in the http-client response buffer. Thus, since commit b24260ec9 ("BUG/MEDIUM: http-client: Only consume input buffer when hc one is empty"), the http-client applet stops to consume data as soon as the first part of the payload is stored in its response buffer, waiting for the caller to consume it. But it never happens. So, when the response is not received in one time, the ACME task is stuck till the server timeout expiration. The HTTPCLIENT_O_RES_ACCUM option is now set to instruct the http-client to continue to fill its response buffer. This patch depends on : * BUG/MEDIUM: http-client: Don't use the httpclient context if it was released * MINOR: http-client: Add an option to not stop the reception of the response It must be backported as far as 3.3 with commit b24260ec9. --- diff --git a/src/acme.c b/src/acme.c index d536b2be9..dbf1d1f3a 100644 --- a/src/acme.c +++ b/src/acme.c @@ -1329,6 +1329,11 @@ int acme_http_req(struct task *task, struct acme_ctx *ctx, struct ist url, enum if (httpclient_req_gen(hc, hc->req.url, hc->req.meth, hdrs, payload) != ERR_NONE) goto error; + /* The response payload is not consumed on the fly. It is retrieved at + * the end of the response. + */ + hc->options |= HTTPCLIENT_O_RES_ACCUM; + hc->ops.res_end = acme_httpclient_end; ctx->hc = hc;