Module: check_mk
Branch: master
Commit: 44bcab548cf32ebdb05f3a8df6f809eec5c7b54e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=44bcab548cf32e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Nov 11 10:34:23 2015 +0100
#2761 FIX check_http: Fixed handling of multiple strings given as "Strings to expect
in server response"
---
.werks/2761 | 10 ++++++++++
ChangeLog | 1 +
checks/check_http | 4 ++--
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/2761 b/.werks/2761
new file mode 100644
index 0000000..639a979
--- /dev/null
+++ b/.werks/2761
@@ -0,0 +1,10 @@
+Title: check_http: Fixed handling of multiple strings given as "Strings to expect in
server response"
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1447234428
+
+
diff --git a/ChangeLog b/ChangeLog
index ed68509..c9d0896 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -66,6 +66,7 @@
* 2700 FIX: ibm_svc_node: fixed handling with agent output after firmware update
* 2701 FIX: zfsget: fixed handling in case of zero total size based on buggy 'df
-h' command on some solaris systems...
* 2702 FIX: oracle_diva_csm: fixed handling of empty sublists
+ * 2761 FIX: check_http: Fixed handling of multiple strings given as "Strings to
expect in server response"
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/check_http b/checks/check_http
index 85b3153..5d4e9da 100644
--- a/checks/check_http
+++ b/checks/check_http
@@ -101,8 +101,8 @@ def check_http_arguments(params):
if "onredirect" in settings:
args += ' --onredirect=%s' % settings["onredirect"]
- for s in settings.get("expect_response", []):
- args += ' -e %s' % quote_shell_string(s)
+ if "expect_response" in settings:
+ args += ' -e %s' %
quote_shell_string(",".join(settings["expect_response"]))
if "expect_string" in settings:
args += ' -s %s' %
quote_shell_string(settings["expect_string"])