author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 7 Jul 2017 16:43:39 +0000 (18:43 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 7 Jul 2017 16:43:57 +0000 (18:43 +0200) |
Fixes #2328
Conflicts:
src/curl_json.c
src/curl_xml.c
Conflicts:
src/curl_json.c
src/curl_xml.c
1 | 2 | |||
---|---|---|---|---|
src/apache.c | patch | | diff1 | | diff2 | | blob | history |
src/ascent.c | patch | | diff1 | | diff2 | | blob | history |
src/bind.c | patch | | diff1 | | diff2 | | blob | history |
src/curl.c | patch | | diff1 | | diff2 | | blob | history |
src/curl_json.c | patch | | diff1 | | diff2 | | blob | history |
src/curl_xml.c | patch | | diff1 | | diff2 | | blob | history |
src/nginx.c | patch | | diff1 | | diff2 | | blob | history |
src/write_http.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc src/apache.c
index e2f75c180ae219dfeb81d7abfdfa5fda0b54db25,29c36cc0f9e1201e5239565d0d2d456a0ce21ffb..92c2c8be6c130174d7924d66c5cd20da983fe34f
--- 1/src/apache.c
--- 2/src/apache.c
+++ b/src/apache.c
assert(st->curl != NULL);
st->apache_buffer_fill = 0;
+
+ curl_easy_setopt(st->curl, CURLOPT_URL, st->url);
+
if (curl_easy_perform(st->curl) != CURLE_OK) {
ERROR("apache: curl_easy_perform failed: %s", st->apache_curl_error);
- return (-1);
+ return -1;
}
/* fallback - server_type to apache if not set at this time */
diff --cc src/ascent.c
index 16f9104618207c85313f3e4f128e622fd4875c54,74cef333ee1174ee2209edd4885b23280a0b6966..40b153690e8ed41a15645e017d17214c74024e11
--- 1/src/ascent.c
--- 2/src/ascent.c
+++ b/src/ascent.c
}
ascent_buffer_fill = 0;
+
+ curl_easy_setopt(curl, CURLOPT_URL, url);
+
if (curl_easy_perform(curl) != CURLE_OK) {
ERROR("ascent plugin: curl_easy_perform failed: %s", ascent_curl_error);
- return (-1);
+ return -1;
}
status = ascent_xml(ascent_buffer);
diff --cc src/bind.c
index b7308ad83ae7707a9b992aa0a168f1b9ae850593,8a3148ccca564b1399ae58eb09dfd80424de480f..824d044719d3f71c42f5b899ef68f063ab7d188b
--- 1/src/bind.c
--- 2/src/bind.c
+++ b/src/bind.c
}
bind_buffer_fill = 0;
+
+ curl_easy_setopt(curl, CURLOPT_URL, (url != NULL) ? url : BIND_DEFAULT_URL);
+
if (curl_easy_perform(curl) != CURLE_OK) {
ERROR("bind plugin: curl_easy_perform failed: %s", bind_curl_error);
- return (-1);
+ return -1;
}
status = bind_xml(bind_buffer);
diff --cc src/curl.c
Simple merge
diff --cc src/curl_json.c
index 8037742adb939214789d172da67e6981ef5372ab,8f6382b844cd281e231a12358973dd8875520d05..cc5600f3d92ee3ef5089564c3e955ba3c32abbac
--- 1/src/curl_json.c
--- 2/src/curl_json.c
+++ b/src/curl_json.c
status = curl_easy_perform(db->curl);
if (status != CURLE_OK) {
ERROR("curl_json plugin: curl_easy_perform failed with status %i: %s (%s)",
- status, db->curl_errbuf, url);
+ status, db->curl_errbuf, db->url);
- return (-1);
+ return -1;
}
if (db->stats != NULL)
curl_stats_dispatch(db->stats, db->curl, cj_host(db), "curl_json",
diff --cc src/curl_xml.c
index a0dca05ea79c26ca9c10889af5529a6bfd44634e,7c422c71cc4db410e375174b554efa6b25c6ed2e..43561a8379183cdfc8a7f609ef97c3656176e528
--- 1/src/curl_xml.c
--- 2/src/curl_xml.c
+++ b/src/curl_xml.c
status = curl_easy_perform(curl);
if (status != CURLE_OK) {
ERROR("curl_xml plugin: curl_easy_perform failed with status %i: %s (%s)",
- status, db->curl_errbuf, url);
+ status, db->curl_errbuf, db->url);
- return (-1);
+ return -1;
}
if (db->stats != NULL)
curl_stats_dispatch(db->stats, db->curl, cx_host(db), "curl_xml",
diff --cc src/nginx.c
index 0f1da0aebdfeb522f15182b91255e5b2ebef12ff,060eae23b1712c79f09ecc43fd29d7208a590289..c7e8a08e976fd66c8d51e5b17b7cc8256efce3bf
--- 1/src/nginx.c
--- 2/src/nginx.c
+++ b/src/nginx.c
int fields_num;
if (curl == NULL)
- return (-1);
+ return -1;
if (url == NULL)
- return (-1);
+ return -1;
nginx_buffer_len = 0;
+
+ curl_easy_setopt(curl, CURLOPT_URL, url);
+
if (curl_easy_perform(curl) != CURLE_OK) {
WARNING("nginx plugin: curl_easy_perform failed: %s", nginx_curl_error);
- return (-1);
+ return -1;
}
ptr = nginx_buffer;
diff --cc src/write_http.c
Simple merge