From owner-svn-ports-all@freebsd.org Thu Mar 2 09:55:15 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B490CF3425; Thu, 2 Mar 2017 09:55:15 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBB71D7; Thu, 2 Mar 2017 09:55:14 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v229tDBZ016917; Thu, 2 Mar 2017 09:55:13 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v229tDDR016915; Thu, 2 Mar 2017 09:55:13 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201703020955.v229tDDR016915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Thu, 2 Mar 2017 09:55:13 +0000 (UTC) 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 X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2017 09:55:15 -0000 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" +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) {