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 1213c31272

Spotted by Codex Security

Closes #21121
This commit is contained in:
Daniel Stenberg 2026-03-27 14:33:33 +01:00
parent 2e8c922a89
commit 28fbf4a87d
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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;
}