X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcurl.c;h=a43e7ed9000781b16390dfb024ce270858b64b86;hb=e21d0408e4e4001b8c66bb1ea7d41b890100d0f5;hp=88b5496d4a4b5f317fc3a0ead52cdaf3aec9c5f3;hpb=c01301e8a69b8d53b06b522b107c97dcb65093ad;p=collectd.git diff --git a/src/curl.c b/src/curl.c index 88b5496d..a43e7ed9 100644 --- a/src/curl.c +++ b/src/curl.c @@ -222,6 +222,29 @@ static int cc_config_add_match_dstype (int *dstype_ret, /* {{{ */ else dstype = 0; } +else if (strncasecmp ("Derive", ci->values[0].value.string, + strlen ("Derive")) == 0) + { + dstype = UTILS_MATCH_DS_TYPE_DERIVE; + if (strcasecmp ("DeriveSet", ci->values[0].value.string) == 0) + dstype |= UTILS_MATCH_CF_DERIVE_SET; + else if (strcasecmp ("DeriveAdd", ci->values[0].value.string) == 0) + dstype |= UTILS_MATCH_CF_DERIVE_ADD; + else if (strcasecmp ("DeriveInc", ci->values[0].value.string) == 0) + dstype |= UTILS_MATCH_CF_DERIVE_INC; + else + dstype = 0; + } +else if (strncasecmp ("Absolute", ci->values[0].value.string, + strlen ("Absolute")) == 0) + { + dstype = UTILS_MATCH_DS_TYPE_ABSOLUTE; + if (strcasecmp ("AbsoluteSet", ci->values[0].value.string) == 0) /* Absolute DS is reset-on-read so no sense doin anything else but set */ + dstype |= UTILS_MATCH_CF_ABSOLUTE_SET; + else + dstype = 0; + } + else { dstype = 0; @@ -346,6 +369,7 @@ static int cc_page_init_curl (web_page_t *wp) /* {{{ */ PACKAGE_NAME"/"PACKAGE_VERSION); curl_easy_setopt (wp->curl, CURLOPT_ERRORBUFFER, wp->curl_errbuf); curl_easy_setopt (wp->curl, CURLOPT_URL, wp->url); + curl_easy_setopt (wp->curl, CURLOPT_FOLLOWLOCATION, 1); if (wp->user != NULL) {