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