[monitoring-plugins] fixed a missing else before curl_easy_setopt ...

Andreas Baumann git at monitoring-plugins.org
Fri Mar 17 15:40:13 CET 2017


 Module: monitoring-plugins
 Branch: feature_check_curl
 Commit: 5b6cbb27bda5da82f276fa5f851033cf089a1a7b
 Author: Andreas Baumann <mail at andreasbaumann.cc>
   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) */



More information about the Commits mailing list