From 313f2d29a23de9ac44528a46efac278c8c41a22b Mon Sep 17 00:00:00 2001
From: Alam Ed Arias <alam@srb2.org>
Date: Sat, 12 Apr 2025 15:24:54 +0000
Subject: [PATCH] set CURLOPT_MAXREDIRS to 30

---
 src/netcode/http-mserv.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/netcode/http-mserv.c b/src/netcode/http-mserv.c
index fd0b4aaf70..1623e1dec0 100644
--- a/src/netcode/http-mserv.c
+++ b/src/netcode/http-mserv.c
@@ -277,6 +277,9 @@ HMS_connect (int proto, const char *format, ...)
 	cc = curl_easy_setopt(curl, CURLOPT_TIMEOUT, cv_masterserver_timeout.value);
 	if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", buffer->errbuf);
 
+	cc = curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 30L);
+	if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", buffer->errbuf);
+
 	cc = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, HMS_on_read);
 	if (cc != CURLE_OK) I_OutputMsg("libcurl: %s\n", buffer->errbuf);
 
-- 
GitLab