summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8aa65b2)
raw | patch | inline | side by side (parent: 8aa65b2)
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Thu, 5 Feb 2009 05:08:54 +0000 (00:08 -0500) | ||
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Thu, 5 Feb 2009 05:47:07 +0000 (00:47 -0500) |
NEWS | patch | blob | history | |
plugins/check_http.c | patch | blob | history |
index 5ba475842cf4d41c48602885c875e3ec88ff147b..743857f5e762638f93b6c086639875f241a4ae64 100644 (file)
--- a/NEWS
+++ b/NEWS
Re-bundled libtap as a built-in library (--enable-libtap): detects system library as pre-1.4.13 and does not install the built-in library anymore
Fixed check_mrtg returning UNKNOWN instead of OK (bug #2378068)
Fixed check_http behaviour: all check are now performed as long as a valid response is returned (sf.net #1460312)
+ check_http --onredirect=sticky follows using the same IP address (sf.net #2550208).
1.4.13 25th Sept 2008
Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen)
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 933e9d4fc72c43359efc12bc8e8d1cdc012fdb0b..620e1578097d1761d44e07937d1956d3809c0504 100644 (file)
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
char **http_opt_headers;
int http_opt_headers_count = 0;
int onredirect = STATE_OK;
+int followsticky = 0;
int use_ssl = FALSE;
int verbose = FALSE;
int sd;
server_port = HTTPS_PORT;
break;
case 'f': /* onredirect */
+ if (!strcmp (optarg, "sticky"))
+ onredirect = STATE_DEPENDENT, followsticky = 1;
if (!strcmp (optarg, "follow"))
- onredirect = STATE_DEPENDENT;
+ onredirect = STATE_DEPENDENT, followsticky = 0;
if (!strcmp (optarg, "unknown"))
onredirect = STATE_UNKNOWN;
if (!strcmp (optarg, "ok"))
free (host_name);
host_name = strdup (addr);
- free (server_address);
- server_address = strdup (addr);
+ if (followsticky == 0) {
+ free (server_address);
+ server_address = strdup (addr);
+ }
free (server_url);
server_url = url;
printf (" %s\n", _(" Any other tags to be sent in http header. Use multiple times for additional headers"));
printf (" %s\n", "-L, --link");
printf (" %s\n", _("Wrap output in HTML link (obsoleted by urlize)"));
- printf (" %s\n", "-f, --onredirect=<ok|warning|critical|follow>");
- printf (" %s\n", _("How to handle redirected pages"));
+ printf (" %s\n", "-f, --onredirect=<ok|warning|critical|follow|sticky>");
+ printf (" %s\n", _("How to handle redirected pages. sticky is like follow but stick to the"));
+ printf (" %s\n", _("specified IP address"));
printf (" %s\n", "-m, --pagesize=INTEGER<:INTEGER>");
printf (" %s\n", _("Minimum page size required (bytes) : Maximum page size required (bytes)"));