SF.net SVN: nagiosplug:[2174] nagiosplug/trunk

[email protected]
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
Revision: 2174
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2174&view=rev
Author:   dermoth
Date:     2009-03-19 21:06:14 +0000 (Thu, 19 Mar 2009)

Log Message:
-----------
Fixed check_http not timing-out on redirects

From: Thomas Guyot-Sionnest [email protected] <[email protected]>

Modified Paths:
--------------
    nagiosplug/trunk/NEWS
    nagiosplug/trunk/plugins/check_http.c

Modified: nagiosplug/trunk/NEWS
===================================================================
--- nagiosplug/trunk/NEWS	2009-03-19 06:11:15 UTC (rev 2173)
+++ nagiosplug/trunk/NEWS	2009-03-19 21:06:14 UTC (rev 2174)
@@ -24,6 +24,7 @@
 	Fixed coredump from check_nt when invalid drive is specified (#2179754 - Olli Hauer)
 	Fixed passing of quotes in OID for check_snmp (#1985230 - Jan Wagner, patch by John Barbuto)
 	Fixed check_http sending HTTP/1.0 with v1.1 headers (#2638765)
+	Fixed check_http not timing-out on redirects
 
 1.4.13 25th Sept 2008
 	Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen)

Modified: nagiosplug/trunk/plugins/check_http.c
===================================================================
--- nagiosplug/trunk/plugins/check_http.c	2009-03-19 06:11:15 UTC (rev 2173)
+++ nagiosplug/trunk/plugins/check_http.c	2009-03-19 21:06:14 UTC (rev 2174)
@@ -894,9 +894,6 @@
 #endif
   if (sd) close(sd);
 
-  /* reset the alarm */
-  alarm (0);
-
   /* Save check time */
   microsec = deltime (tv);
   elapsed_time = (double)microsec / 1.0e6;
@@ -999,6 +996,9 @@
 
   } /* end else (server_expect_yn)  */
 
+  /* reset the alarm - must be called *after* redir or we'll never die on redirects! */
+  alarm (0);
+
   if (maximum_age >= 0) {
     result = max_state_alt(check_document_dates(header, &msg), result);
   }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.