summaryrefslogtreecommitdiffstats
path: root/web/attachments/39582-check_http_patch
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/39582-check_http_patch')
-rw-r--r--web/attachments/39582-check_http_patch123
1 files changed, 123 insertions, 0 deletions
diff --git a/web/attachments/39582-check_http_patch b/web/attachments/39582-check_http_patch
new file mode 100644
index 0000000..cb9f624
--- /dev/null
+++ b/web/attachments/39582-check_http_patch
@@ -0,0 +1,123 @@
1Index: plugins/check_http.c
2===================================================================
3RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_http.c,v
4retrieving revision 1.13
5diff -c -r1.13 check_http.c
6*** plugins/check_http.c 19 Dec 2002 19:20:25 -0000 1.13
7--- plugins/check_http.c 13 Jan 2003 03:52:29 -0000
8***************
9*** 44,50 ****
10 \(-H <vhost> | -I <IP-address>) [-u <uri>] [-p <port>]\n\
11 [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L]\n\
12 [-a auth] [-f <ok | warn | critcal | follow>] [-e <expect>]\n\
13! [-s string] [-r <regex> | -R <case-insensitive regex>]\n\
14 [-P string]"
15
16 #define LONGOPTIONS "\
17--- 44,50 ----
18 \(-H <vhost> | -I <IP-address>) [-u <uri>] [-p <port>]\n\
19 [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L]\n\
20 [-a auth] [-f <ok | warn | critcal | follow>] [-e <expect>]\n\
21! [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n\
22 [-P string]"
23
24 #define LONGOPTIONS "\
25***************
26*** 75,80 ****
27--- 75,82 ----
28 Wrap output in HTML link (obsoleted by urlize)\n\
29 -f, --onredirect=<ok|warning|critical|follow>\n\
30 How to handle redirected pages\n%s\
31+ -l, --linespan\n\
32+ Allow regex to span newlines (must precede -r or -R)\n\
33 -v, --verbose\n\
34 Show details for command-line debugging (do not use with nagios server)\n\
35 -h, --help\n\
36***************
37*** 286,291 ****
38--- 288,294 ----
39 {"regex", required_argument, 0, 'r'},
40 {"ereg", required_argument, 0, 'r'},
41 {"eregi", required_argument, 0, 'R'},
42+ {"linespan", no_argument, 0, 'l'},
43 {"onredirect", required_argument, 0, 'f'},
44 {"certificate", required_argument, 0, 'C'},
45 {0, 0, 0, 0}
46***************
47*** 308,314 ****
48 strcpy (argv[c], "-n");
49 }
50
51! #define OPTCHARS "Vvht:c:w:H:P:I:a:e:p:s:R:r:u:f:C:nLS"
52
53 while (1) {
54 #ifdef HAVE_GETOPT_H
55--- 311,317 ----
56 strcpy (argv[c], "-n");
57 }
58
59! #define OPTCHARS "Vvht:c:w:H:P:I:a:e:p:s:R:r:lu:f:C:nLS"
60
61 while (1) {
62 #ifdef HAVE_GETOPT_H
63***************
64*** 420,434 ****
65 server_expect[MAX_INPUT_BUFFER - 1] = 0;
66 server_expect_yn = 1;
67 break;
68 case 'R': /* regex */
69! #ifdef HAVE_REGEX_H
70! cflags = REG_ICASE;
71! #else
72 usage ("check_http: call for regex which was not a compiled option\n");
73! #endif
74 case 'r': /* regex */
75! #ifdef HAVE_REGEX_H
76 cflags |= REG_EXTENDED | REG_NOSUB | REG_NEWLINE;
77 strncpy (regexp, optarg, MAX_RE_SIZE - 1);
78 regexp[MAX_RE_SIZE - 1] = 0;
79 errcode = regcomp (&preg, regexp, cflags);
80--- 423,444 ----
81 server_expect[MAX_INPUT_BUFFER - 1] = 0;
82 server_expect_yn = 1;
83 break;
84+ #ifndef HAVE_REGEX_H
85+ case 'l': /* linespan */
86 case 'R': /* regex */
87! case 'r': /* regex */
88 usage ("check_http: call for regex which was not a compiled option\n");
89! break;
90! #else
91! case 'l': /* linespan */
92! cflags &= ~REG_NEWLINE;
93! break;
94! case 'R': /* regex */
95! cflags |= REG_ICASE;
96 case 'r': /* regex */
97! /* this is not required here, as it's initialized
98 cflags |= REG_EXTENDED | REG_NOSUB | REG_NEWLINE;
99+ */
100 strncpy (regexp, optarg, MAX_RE_SIZE - 1);
101 regexp[MAX_RE_SIZE - 1] = 0;
102 errcode = regcomp (&preg, regexp, cflags);
103***************
104*** 437,446 ****
105 printf ("Could Not Compile Regular Expression: %s", errbuf);
106 return ERROR;
107 }
108- #else
109- usage ("check_http: call for regex which was not a compiled option\n");
110- #endif
111 break;
112 case 'v': /* verbose */
113 verbose = TRUE;
114 break;
115--- 447,454 ----
116 printf ("Could Not Compile Regular Expression: %s", errbuf);
117 return ERROR;
118 }
119 break;
120+ #endif
121 case 'v': /* verbose */
122 verbose = TRUE;
123 break;