summaryrefslogtreecommitdiffstats
path: root/web/attachments/261480-nagios-plugins-1.4.11-check_http-sizecheck.patch
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/261480-nagios-plugins-1.4.11-check_http-sizecheck.patch')
-rw-r--r--web/attachments/261480-nagios-plugins-1.4.11-check_http-sizecheck.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/web/attachments/261480-nagios-plugins-1.4.11-check_http-sizecheck.patch b/web/attachments/261480-nagios-plugins-1.4.11-check_http-sizecheck.patch
new file mode 100644
index 0000000..e6831d9
--- /dev/null
+++ b/web/attachments/261480-nagios-plugins-1.4.11-check_http-sizecheck.patch
@@ -0,0 +1,34 @@
1--- check_http.c (revision 1904)
2+++ check_http.c (working copy)
3@@ -961,14 +961,7 @@
4 /* these checks should be last */
5
6 if (strlen (string_expect)) {
7- if (strstr (page, string_expect)) {
8- printf (_("HTTP OK %s - %.3f second response time %s|%s %s\n"),
9- status_line, elapsed_time,
10- (display_html ? "</A>" : ""),
11- perfd_time (elapsed_time), perfd_size (pagesize));
12- exit (STATE_OK);
13- }
14- else {
15+ if (!strstr (page, string_expect)) {
16 printf (_("HTTP CRITICAL - string not found%s|%s %s\n"),
17 (display_html ? "</A>" : ""),
18 perfd_time (elapsed_time), perfd_size (pagesize));
19@@ -979,11 +972,10 @@
20 if (strlen (regexp)) {
21 errcode = regexec (&preg, page, REGS, pmatch, 0);
22 if ((errcode == 0 && invert_regex == 0) || (errcode == REG_NOMATCH && invert_regex == 1)) {
23- printf (_("HTTP OK %s - %.3f second response time %s|%s %s\n"),
24- status_line, elapsed_time,
25- (display_html ? "</A>" : ""),
26- perfd_time (elapsed_time), perfd_size (pagesize));
27- exit (STATE_OK);
28+ /*
29+ Success, i.e. don't do anything here -- let the final success
30+ handler take care of it.
31+ */
32 }
33 else if ((errcode == REG_NOMATCH && invert_regex == 0) || (errcode == 0 && invert_regex == 1)) {
34 if (invert_regex == 0)