Add protection from infinite redirect loops to curl-using plugins
[collectd.git] / src / apache.c
index 33ee130..b1f9eaa 100644 (file)
@@ -457,6 +457,7 @@ static int init_host (apache_t *st) /* {{{ */
 
        curl_easy_setopt (st->curl, CURLOPT_URL, st->url);
        curl_easy_setopt (st->curl, CURLOPT_FOLLOWLOCATION, 1L);
+       curl_easy_setopt (st->curl, CURLOPT_MAXREDIRS, 50L);
 
        if (st->verify_peer != 0)
        {