Add protection from infinite redirect loops to curl-using plugins
[collectd.git] / src / ascent.c
index 3a7c393..2378386 100644 (file)
@@ -562,6 +562,7 @@ static int ascent_init (void) /* {{{ */
 
   curl_easy_setopt (curl, CURLOPT_URL, url);
   curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1L);
+  curl_easy_setopt (curl, CURLOPT_MAXREDIRS, 50L);
 
   if ((verify_peer == NULL) || IS_TRUE (verify_peer))
     curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, 1L);