From bdf13b695778a35b5084c6e14b7231074a3b8ef6 Mon Sep 17 00:00:00 2001
From: Felice D'Angelo <felice.dangelo2013@gmail.com>
Date: Thu, 8 Feb 2024 17:09:26 +0000
Subject: [PATCH] Fix /unlist request

---
 src/netcode/http-mserv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/netcode/http-mserv.c b/src/netcode/http-mserv.c
index 10137e67b0..2b52380cf5 100644
--- a/src/netcode/http-mserv.c
+++ b/src/netcode/http-mserv.c
@@ -493,7 +493,8 @@ HMS_unlist (void)
 	if (! hms)
 		return 0;
 
-	curl_easy_setopt(hms->curl, CURLOPT_CUSTOMREQUEST, "POST");
+	curl_easy_setopt(hms->curl, CURLOPT_POST, 1);
+	curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDSIZE, 0);
 
 	ok = HMS_do(hms);
 	HMS_end(hms);
@@ -508,7 +509,8 @@ HMS_unlist (void)
 		if (! hms)
 			return 0;
 
-		curl_easy_setopt(hms->curl, CURLOPT_CUSTOMREQUEST, "POST");
+		curl_easy_setopt(hms->curl, CURLOPT_POST, 1);
+		curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDSIZE, 0);
 
 		ok = HMS_do(hms);
 		HMS_end(hms);
-- 
GitLab