X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnginx.c;h=7568a2c5ee2ded6439b6eb24927d64bb1b503e4a;hb=d6021a800b12c89b5a78877af2c5b9abc1a8e609;hp=b76f25b360ba6bf1771519f34f044c134ff98c32;hpb=7a6887ad7eef33e04bcb0720c213d05fd9be8a59;p=collectd.git diff --git a/src/nginx.c b/src/nginx.c index b76f25b3..7568a2c5 100644 --- a/src/nginx.c +++ b/src/nginx.c @@ -144,6 +144,7 @@ static int init (void) } curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1L); + curl_easy_setopt (curl, CURLOPT_MAXREDIRS, 50L); if ((verify_peer == NULL) || IS_TRUE (verify_peer)) { @@ -214,7 +215,7 @@ static int nginx_read (void) return (-1); nginx_buffer_len = 0; - if (curl_easy_perform (curl) != 0) + if (curl_easy_perform (curl) != CURLE_OK) { WARNING ("nginx plugin: curl_easy_perform failed: %s", nginx_curl_error); return (-1);