[monitoring-plugins] fixed a missing else before curl_easy_setopt ...
Andreas Baumann <[email protected]> Fri, 17 Mar 2017 15:40:13 +0100 (CET)
| Newsgroups | gmane.network.nagios.cvs |
|---|---|
| Message-ID | <20170317144013.20D382008486__45287.4795919799$1489761624$gmane$org@orwell.monitoring-plugins.org> |
Module: monitoring-plugins Branch: feature_check_curl Commit: 5b6cbb27bda5da82f276fa5f851033cf089a1a7b Author: Andreas Baumann <[email protected]> Date: Fri Mar 17 15:29:45 2017 +0100 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=5b6cbb2 fixed a missing else before curl_easy_setopt CURLOPT_CUSTOMREQUEST --- plugins/check_curl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/check_curl.c b/plugins/check_curl.c index a7e580d..10ccadf 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c @@ -235,7 +235,8 @@ check_http (void) curl_easy_setopt (curl, CURLOPT_POST, 1); else if (!strcmp(http_method, "PUT")) curl_easy_setopt (curl, CURLOPT_PUT, 1); - curl_easy_setopt (curl, CURLOPT_CUSTOMREQUEST, http_method); + else + curl_easy_setopt (curl, CURLOPT_CUSTOMREQUEST, http_method); } /* set hostname (virtual hosts) */