diff options
author | Thomas Guyot-Sionnest thomas@aei.ca <root@sinnms01.180solutions.com> | 2009-03-19 13:59:43 -0700 |
---|---|---|
committer | Thomas Guyot-Sionnest thomas@aei.ca <root@sinnms01.180solutions.com> | 2009-03-19 13:59:43 -0700 |
commit | 3dd27fb0637cb13c9de09b976765f7a2ba770ac7 (patch) | |
tree | e350d07c3b308ff4ff79541d45148be3fcacdbb4 | |
parent | 37e432ec776cda34e0e410fe5c75eb3b4871f74c (diff) | |
download | monitoring-plugins-3dd27fb0637cb13c9de09b976765f7a2ba770ac7.tar.gz |
Fixed check_http not timing-out on redirects
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | plugins/check_http.c | 6 |
2 files changed, 4 insertions, 3 deletions
@@ -24,6 +24,7 @@ This file documents the major additions and syntax changes between releases. | |||
24 | Fixed coredump from check_nt when invalid drive is specified (#2179754 - Olli Hauer) | 24 | Fixed coredump from check_nt when invalid drive is specified (#2179754 - Olli Hauer) |
25 | Fixed passing of quotes in OID for check_snmp (#1985230 - Jan Wagner, patch by John Barbuto) | 25 | Fixed passing of quotes in OID for check_snmp (#1985230 - Jan Wagner, patch by John Barbuto) |
26 | Fixed check_http sending HTTP/1.0 with v1.1 headers (#2638765) | 26 | Fixed check_http sending HTTP/1.0 with v1.1 headers (#2638765) |
27 | Fixed check_http not timing-out on redirects | ||
27 | 28 | ||
28 | 1.4.13 25th Sept 2008 | 29 | 1.4.13 25th Sept 2008 |
29 | Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen) | 30 | Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen) |
diff --git a/plugins/check_http.c b/plugins/check_http.c index 2f2460c6..72d0a2b6 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c | |||
@@ -894,9 +894,6 @@ check_http (void) | |||
894 | #endif | 894 | #endif |
895 | if (sd) close(sd); | 895 | if (sd) close(sd); |
896 | 896 | ||
897 | /* reset the alarm */ | ||
898 | alarm (0); | ||
899 | |||
900 | /* Save check time */ | 897 | /* Save check time */ |
901 | microsec = deltime (tv); | 898 | microsec = deltime (tv); |
902 | elapsed_time = (double)microsec / 1.0e6; | 899 | elapsed_time = (double)microsec / 1.0e6; |
@@ -999,6 +996,9 @@ check_http (void) | |||
999 | 996 | ||
1000 | } /* end else (server_expect_yn) */ | 997 | } /* end else (server_expect_yn) */ |
1001 | 998 | ||
999 | /* reset the alarm - must be called *after* redir or we'll never die on redirects! */ | ||
1000 | alarm (0); | ||
1001 | |||
1002 | if (maximum_age >= 0) { | 1002 | if (maximum_age >= 0) { |
1003 | result = max_state_alt(check_document_dates(header, &msg), result); | 1003 | result = max_state_alt(check_document_dates(header, &msg), result); |
1004 | } | 1004 | } |