Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Mar 2017 09:55:13 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r435221 - in head/net-mgmt/nagios-plugins: . files
Message-ID:  <201703020955.v229tDDR016915@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Thu Mar  2 09:55:13 2017
New Revision: 435221
URL: https://svnweb.freebsd.org/changeset/ports/435221

Log:
  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

Added:
  head/net-mgmt/nagios-plugins/files/patch-plugins_check__http.c   (contents, props changed)
Modified:
  head/net-mgmt/nagios-plugins/Makefile   (contents, props changed)

Modified: head/net-mgmt/nagios-plugins/Makefile
==============================================================================
--- head/net-mgmt/nagios-plugins/Makefile	Thu Mar  2 09:40:00 2017	(r435220)
+++ head/net-mgmt/nagios-plugins/Makefile	Thu Mar  2 09:55:13 2017	(r435221)
@@ -3,7 +3,7 @@
 
 PORTNAME=	nagios-plugins
 PORTVERSION=	2.2.0
-PORTREVISION=	0
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	net-mgmt
 MASTER_SITES=	https://www.nagios-plugins.org/download/ \

Added: head/net-mgmt/nagios-plugins/files/patch-plugins_check__http.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/nagios-plugins/files/patch-plugins_check__http.c	Thu Mar  2 09:55:13 2017	(r435221)
@@ -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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703020955.v229tDDR016915>