diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2017-03-02 09:55:13 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2017-03-02 09:55:13 +0000 |
commit | 5efa59cc20ca221e60d25f6cc4b2859a58b44603 (patch) | |
tree | 0dca0e51a62aa26bd54fe16baea75d033e2a02bc /net-mgmt/nagios-plugins/files | |
parent | Update devel/erlang-metrics to version 2.2.0. (diff) |
Fix a check_http bug introduced while fixing some other bug.
Obtained from: https://github.com/nagios-plugins/nagios-plugins/commit/7300528aca1da07b93cab52493552b445b1c276b
Sponsored by: Absolight
Notes
Notes:
svn path=/head/; revision=435221
Diffstat (limited to 'net-mgmt/nagios-plugins/files')
-rw-r--r-- | net-mgmt/nagios-plugins/files/patch-plugins_check__http.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/net-mgmt/nagios-plugins/files/patch-plugins_check__http.c b/net-mgmt/nagios-plugins/files/patch-plugins_check__http.c new file mode 100644 index 000000000000..2f3573b755bd --- /dev/null +++ b/net-mgmt/nagios-plugins/files/patch-plugins_check__http.c @@ -0,0 +1,25 @@ +From 7300528aca1da07b93cab52493552b445b1c276b Mon Sep 17 00:00:00 2001 +From: "John C. Frickson" <jfrickson@nagios.com> +Date: Mon, 27 Feb 2017 15:29:06 -0600 +Subject: [PATCH] check_http reports warning where it should report ok with -e + +Fix for issue #236 +--- plugins/check_http.c.orig 2017-01-19 16:01:31 UTC ++++ plugins/check_http.c +@@ -1263,12 +1263,14 @@ check_http (void) + /* server errors result in a critical state */ + else if (http_status >= 500) { + xasprintf (&msg, _("%s%s - "), msg, status_line); +- result = STATE_CRITICAL; ++ if (bad_response || !server_expect_yn) ++ result = STATE_CRITICAL; + } + /* client errors result in a warning state */ + else if (http_status >= 400) { + xasprintf (&msg, _("%s%s - "), msg, status_line); +- result = max_state_alt(STATE_WARNING, result); ++ if (bad_response || !server_expect_yn) ++ result = max_state_alt(STATE_WARNING, result); + } + /* check redirected page if specified */ + else if (http_status >= 300) { |