commit 5853eb1f7f6458a277f1264e2305b33cf2712aa9
parent b12e8e64987d2b96a30a522488f3adcb1ef40545
Author: Erik Agsjö <erik.agsjo@gmail.com>
Date: Sun, 5 Dec 2021 20:12:48 +0100
Follow redirects on linux
Diffstat:
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/naett.c b/naett.c
@@ -877,6 +877,8 @@ void naettPlatformMakeRequest(InternalResponse* res) {
curl_easy_setopt(c, CURLOPT_HEADERFUNCTION, headerCallback);
curl_easy_setopt(c, CURLOPT_HEADERDATA, res);
+ curl_easy_setopt(c, CURLOPT_FOLLOWLOCATION, 1);
+
setupMethod(c, req->options.method);
struct curl_slist* headerList = NULL;
diff --git a/src/naett_linux.c b/src/naett_linux.c
@@ -185,6 +185,8 @@ void naettPlatformMakeRequest(InternalResponse* res) {
curl_easy_setopt(c, CURLOPT_HEADERFUNCTION, headerCallback);
curl_easy_setopt(c, CURLOPT_HEADERDATA, res);
+ curl_easy_setopt(c, CURLOPT_FOLLOWLOCATION, 1);
+
setupMethod(c, req->options.method);
struct curl_slist* headerList = NULL;