Tags: patch

Hi,

I found this error is caused by the gpl url redirected from
https://www.gnu.org/licenses/gpl-1.0 to
https://www.gnu.org/licenses/old-licenses/gpl-1.0,
<https://www.gnu.org/licenses/o>

so I added the CURLOPT_FOLLOWLOCATION to tell libcurl to follow redirection.


Regards,

handsome_feng

--- a/src/url-downloader.c
+++ b/src/url-downloader.c
@@ -82,6 +82,7 @@ download (struct lu_state_t *state, char
   curl_easy_setopt (state->curl, CURLOPT_HTTPGET, 1);
   curl_easy_setopt (state->curl, CURLOPT_URL, url);
   curl_easy_setopt (state->curl, CURLOPT_WRITEDATA, fileptr);
+  curl_easy_setopt (state->curl, CURLOPT_FOLLOWLOCATION, 1L);
   curl_easy_perform(state->curl);
   fflush (fileptr);
   fsync (fileno (fileptr));

Attachment: OpenPGP_0x9BB850C013111F0C.asc
Description: application/pgp-keys

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to