X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnginx.c;h=a0fa74f0207812cbf95781ac4b7c1c1a6ea4df26;hb=c6da31fb30c2fb1d131f92efcde0b3ec9a010b2c;hp=f1f3f99c38e684a3e669e109701cad3909054aed;hpb=363c182af2404710a5946ea3d9bb93f29f7927c0;p=collectd.git diff --git a/src/nginx.c b/src/nginx.c index f1f3f99c..a0fa74f0 100644 --- a/src/nginx.c +++ b/src/nginx.c @@ -143,6 +143,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)) { @@ -213,7 +214,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);