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

[email protected]
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
Revision: 2167
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2167&view=rev
Author:   dermoth
Date:     2009-03-17 05:55:13 +0000 (Tue, 17 Mar 2009)

Log Message:
-----------
Fix check_http sending HTTP/1.0 with v1.1 headers (#2638765)

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

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

Modified: nagiosplug/trunk/NEWS
===================================================================
--- nagiosplug/trunk/NEWS	2009-03-16 23:51:15 UTC (rev 2166)
+++ nagiosplug/trunk/NEWS	2009-03-17 05:55:13 UTC (rev 2167)
@@ -23,6 +23,7 @@
 	check_http --onredirect=sticky follows using the same IP address (sf.net #2550208)
 	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)
 
 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-16 23:51:15 UTC (rev 2166)
+++ nagiosplug/trunk/plugins/check_http.c	2009-03-17 05:55:13 UTC (rev 2167)
@@ -794,7 +794,7 @@
   }
 #endif /* HAVE_SSL */
 
-  asprintf (&buf, "%s %s HTTP/1.0\r\n%s\r\n", http_method, server_url, user_agent);
+  asprintf (&buf, "%s %s %s\r\n%s\r\n", http_method, server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent);
 
   /* tell HTTP/1.1 servers not to keep the connection alive */
   asprintf (&buf, "%sConnection: close\r\n", buf);


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.