X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fapache.c;h=df1b560f092e89bbc8dd9cb65309fb55b20216f5;hb=0d5c879672770e3b8a740727fb223a6febdeaa27;hp=371e1d4b3439824a17a07d416a0080fb740c531f;hpb=27db9bf0f4f8ab81c2827cbe113c44ecf0fc7c02;p=collectd.git diff --git a/src/apache.c b/src/apache.c index 371e1d4b..df1b560f 100644 --- a/src/apache.c +++ b/src/apache.c @@ -212,13 +212,9 @@ static int config_set_boolean (int *ret_boolean, /* {{{ */ else /* if (ci->values[0].type != OCONFIG_TYPE_STRING) */ { char *string = ci->values[0].value.string; - if ((strcasecmp ("true", string) == 0) - || (strcasecmp ("yes", string) == 0) - || (strcasecmp ("on", string) == 0)) + if (IS_TRUE (string)) *ret_boolean = 1; - else if ((strcasecmp ("false", string) == 0) - || (strcasecmp ("no", string) == 0) - || (strcasecmp ("off", string) == 0)) + else if (IS_FALSE (string)) *ret_boolean = 0; else { @@ -458,6 +454,7 @@ static int init_host (apache_t *st) /* {{{ */ } curl_easy_setopt (st->curl, CURLOPT_URL, st->url); + curl_easy_setopt (st->curl, CURLOPT_FOLLOWLOCATION, 1); if (st->verify_peer != 0) {