[Nagiosplug-devel] [ nagiosplug-Patches-666952 ] check_http needs an option to allow regex to span newlines

SourceForge.net noreply at sourceforge.net
Mon Jan 13 07:03:05 CET 2003


Patches item #666952, was opened at 2003-01-12 22:57
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=666952&group_id=29880

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: John Sellens (jsellens)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_http needs an option to allow regex to span newlines

Initial Comment:
I want to check a web page that has a number of status
entries for
various servers - I'd like to check a regular
expression that
contains all those servers, but they are on multiple
lines.

check_http.c sets REG_NEWLINE which means that regular
expressions
may not span newlines.  This means that, in my case, I
must check
the web page multiple times.

Here is a patch that adds an option -l / --linespan
that turns off
REG_NEWLINE, thereby allowing regular expressions to
span newlines,
and allowing me to check only once in my tests.

I've also removed some duplication of error messages if
HAVE_REGEX_H
is not defined, hopefully making the code slightly
clearer.

This is a patch against check_http.c version 1.13
(current in CVS).

Cheers!

John
jsellens at generalconcepts.com


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=666952&group_id=29880




More information about the Devel mailing list