Code

ensure all curl-based plugins follow HTTP redirects
[collectd.git] / src / curl_xml.c
index c0ab6fdbed7721374ccbff5e180dce6e897a7690..c9f06518ba1db2499031bc9b66ba262a73567b6d 100644 (file)
@@ -842,6 +842,8 @@ static int cx_init_curl (cx_t *db) /* {{{ */
   curl_easy_setopt (db->curl, CURLOPT_USERAGENT, COLLECTD_USERAGENT);
   curl_easy_setopt (db->curl, CURLOPT_ERRORBUFFER, db->curl_errbuf);
   curl_easy_setopt (db->curl, CURLOPT_URL, db->url);
+  curl_easy_setopt (db->curl, CURLOPT_FOLLOWLOCATION, 1L);
+  curl_easy_setopt (db->curl, CURLOPT_MAXREDIRS, 50L);
 
   if (db->user != NULL)
   {