aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Sven Nierlein <sven@nierlein.org> 2019-02-15 09:02:43 +0100
committerGravatar GitHub <noreply@github.com> 2019-02-15 09:02:43 +0100
commit2962148d8bac3a65f1fb5e1a948e3f0a86a42a1a (patch)
treec27d737788b3df126732eec21802b5b055be4515
parent8f1d3de0b7ee8385a450019f63f91a7149899aa0 (diff)
parentf7f0f7d4671300e54e5d70278fa419c2782d9ef6 (diff)
downloadmonitoring-plugins-2962148d8bac3a65f1fb5e1a948e3f0a86a42a1a.tar.gz
Merge pull request #1582 from towolf/show_body_for_http_expect_case
Also support the --show-body/-B flag when --expect is used
-rw-r--r--plugins/check_http.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 856e1e90..de59a068 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -1155,6 +1155,8 @@ check_http (void)
xasprintf (&msg,
_("Invalid HTTP response received from host on port %d: %s\n"),
server_port, status_line);
+ if (show_body)
+ xasprintf (&msg, _("%s\n%s"), msg, page);
die (STATE_CRITICAL, "HTTP CRITICAL - %s", msg);
}