X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcurl.c;h=fc3af6dbbf32cfe9375abb1be8e89a25bce8ced3;hb=e7a7be6760b7f79780e9e9ed10fa9e029a3faa38;hp=dfc14dcb3f242ba9f13b2e018fee260618de1398;hpb=79963d13c1884d1d92667cc502ad20758b084a12;p=collectd.git diff --git a/src/curl.c b/src/curl.c index dfc14dcb..fc3af6db 100644 --- a/src/curl.c +++ b/src/curl.c @@ -347,7 +347,6 @@ static int cc_page_init_curl(web_page_t *wp) /* {{{ */ curl_easy_setopt(wp->curl, CURLOPT_WRITEDATA, wp); curl_easy_setopt(wp->curl, CURLOPT_USERAGENT, COLLECTD_USERAGENT); 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, 1L); curl_easy_setopt(wp->curl, CURLOPT_MAXREDIRS, 50L); @@ -623,6 +622,9 @@ static int cc_read_page(web_page_t *wp) /* {{{ */ start = cdtime(); wp->buffer_fill = 0; + + curl_easy_setopt(wp->curl, CURLOPT_URL, wp->url); + status = curl_easy_perform(wp->curl); if (status != CURLE_OK) { ERROR("curl plugin: curl_easy_perform failed with status %i: %s", status,