From 28fbf4a87d81107ef548137b75b4f7ef01c4a75c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 27 Mar 2026 14:33:33 +0100 Subject: [PATCH] multi: fix connection retry for non-http non-HTTP protocols no longer retry after connection reuse failures because multi_follow() now requires a handler->follow callback that is NULL for those protocols. Provide a fallback for plain retries. Follow-up to 1213c312722f93b7856d2 Spotted by Codex Security Closes #21121 --- lib/multi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/multi.c b/lib/multi.c index fa8eba2a37..32e7e9ec9d 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -1955,6 +1955,12 @@ static CURLcode multi_follow(struct Curl_easy *data, { if(handler && handler->run->follow) return handler->run->follow(data, newurl, type); + + if(type == FOLLOW_RETRY) + /* Retries are generic and do not require protocol-specific redirect + handling. */ + return CURLE_OK; + return CURLE_TOO_MANY_REDIRECTS; }