Hi release team, I prepared an update for nagios-plugins, which I would ask for approval for including into lenny. It's not uploaded yet, this will be done into unstable if you confirmed the changes. The package fixes 2 issues: 1) fixing #486932, which was closed by last upload, but didn't fix it. The changes here are renaming and rediffing 40_check_http_status_line.dpatch and adding the filename to 00list 2) applying 41_check_http_fix_http_header.dpatch, which fixes #494835 $ diffstat nagios-plugins-interdiff_1.4.12-2_1.4.12-3.diff debian/patches/40_check_http_status_line.dpatch | 26 +++++++++++++++ debian/patches/40_check_http_status_line.patch | 25 --------------- debian/patches/41_check_http_fix_http_header.dpatch | 33 ++++++++++++++++++++ nagios-plugins-1.4.12/debian/changelog | 10 ++++++ nagios-plugins-1.4.12/debian/patches/00list | 2 + 5 files changed, 71 insertions(+), 25 deletions(-) Many thanks and with kind regards, Jan. -- Never write mail to <waja@spamfalle.info>, you have been warned! -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GIT d-- s+: a- C+++ UL++++ P+ L+++ E- W+++ N+++ o++ K++ w--- O M V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI- D++ G++ e++ h-- r+++ y+++ ------END GEEK CODE BLOCK------
diff -u nagios-plugins-1.4.12/debian/changelog nagios-plugins-1.4.12/debian/changelog
--- nagios-plugins-1.4.12/debian/changelog
+++ nagios-plugins-1.4.12/debian/changelog
@@ -1,3 +1,13 @@
+nagios-plugins (1.4.12-3) unstable; urgency=low
+
+ * rename 40_check_http_status_line.patch to 40_check_http_status_line.dpatch
+ and make it able to apply
+ * add 40_check_http_status_line.dpatch to 00list to really fix #486932
+ * add 41_check_http_fix_http_header.dpatch to support virtual servers
+ (Closes: #494835)
+
+ -- Jan Wagner <waja@cyconet.org> Sat, 23 Aug 2008 17:20:34 +0200
+
nagios-plugins (1.4.12-2) unstable; urgency=low
* add 40_check_http_status_line.dpatch to add content of the status_line
diff -u nagios-plugins-1.4.12/debian/patches/00list nagios-plugins-1.4.12/debian/patches/00list
--- nagios-plugins-1.4.12/debian/patches/00list
+++ nagios-plugins-1.4.12/debian/patches/00list
@@ -16,2 +16,4 @@
39_check_dig_options.dpatch
+40_check_http_status_line.dpatch
+41_check_http_fix_http_header.dpatch
50_misc_typos.dpatch
reverted:
--- nagios-plugins-1.4.12/debian/patches/40_check_http_status_line.patch
+++ nagios-plugins-1.4.12.orig/debian/patches/40_check_http_status_line.patch
@@ -1,25 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 40_check_http_status_line.dpatch by Jan Wagner <waja@cyconet.org>
-## patch provided by Josip Rodin <joy@debbugs.entuzijast.net>
-##
-## DP: adds status_line to check_http output
-
-@DPATCH@
---- check_http.c~ 2008-06-19 11:42:25.000000000 +0200
-+++ check_http.c 2008-06-19 11:42:25.000000000 +0200
-@@ -912,11 +912,12 @@
- if (!strstr (status_line, server_expect)) {
- if (server_port == HTTP_PORT)
- asprintf (&msg,
-- _("Invalid HTTP response received from host\n"));
-+ _("Invalid HTTP response received from host: %s\n"),
-+ status_line);
- else
- asprintf (&msg,
-- _("Invalid HTTP response received from host on port %d\n"),
-- server_port);
-+ _("Invalid HTTP response received from host on port %d: %s\n"),
-+ server_port, status_line);
- die (STATE_CRITICAL, "%s", msg);
- }
-
only in patch2:
unchanged:
--- nagios-plugins-1.4.12.orig/debian/patches/40_check_http_status_line.dpatch
+++ nagios-plugins-1.4.12/debian/patches/40_check_http_status_line.dpatch
@@ -0,0 +1,26 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 40_check_http_status_line.dpatch by Jan Wagner <waja@cyconet.org>
+## patch provided by Josip Rodin <joy@debbugs.entuzijast.net>
+##
+## DP: adds status_line to check_http output
+
+@DPATCH@
+diff -urNad nagios-plugins-1.4.12~/plugins/check_http.c nagios-plugins-1.4.12/plugins/check_http.c
+--- nagios-plugins-1.4.12~/plugins/check_http.c 2008-08-23 15:34:17.000000000 +0200
++++ nagios-plugins-1.4.12/plugins/check_http.c 2008-08-23 15:36:20.000000000 +0200
+@@ -879,11 +879,12 @@
+ if (!strstr (status_line, server_expect)) {
+ if (server_port == HTTP_PORT)
+ asprintf (&msg,
+- _("Invalid HTTP response received from host\n"));
++ _("Invalid HTTP response received from host: %s\n"),
++ status_line);
+ else
+ asprintf (&msg,
+- _("Invalid HTTP response received from host on port %d\n"),
+- server_port);
++ _("Invalid HTTP response received from host on port %d: %s\n"),
++ server_port, status_line);
+ die (STATE_CRITICAL, "HTTP CRITICAL - %s", msg);
+ }
+
only in patch2:
unchanged:
--- nagios-plugins-1.4.12.orig/debian/patches/41_check_http_fix_http_header.dpatch
+++ nagios-plugins-1.4.12/debian/patches/41_check_http_fix_http_header.dpatch
@@ -0,0 +1,33 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 41_check_http_fix_http_header.dpatch by Jan Wagner <waja@cyconet.org>, taken
+## from upstream svn
+##
+## DP: Re-structure the HTTP 1.1 headers to prevent 301s on servers with virtual hosts
+
+@DPATCH@
+diff -urNad nagios-plugins-1.4.12~/plugins/check_http.c nagios-plugins-1.4.12/plugins/check_http.c
+--- nagios-plugins-1.4.12~/plugins/check_http.c 2008-08-23 15:41:49.000000000 +0200
++++ nagios-plugins-1.4.12/plugins/check_http.c 2008-08-23 15:50:14.000000000 +0200
+@@ -749,15 +749,17 @@
+ }
+ #endif /* HAVE_SSL */
+
+- asprintf (&buf, "%s %s HTTP/1.0\r\n%s\r\n", http_method, server_url, user_agent);
++ /* If a hostname is provided, use HTTP/1.1 and send the hostname before the
++ * Useragent. This fixes an issue with getting 301 responses from servers
++ * with virtual hosts */
++ if (host_name)
++ asprintf (&buf, "%s %s HTTP/1.1\r\nHost: %s\r\n%s\r\n", http_method, server_url, host_name, user_agent);
++ else
++ asprintf (&buf, "%s %s HTTP/1.0\r\n%s\r\n", http_method, server_url, user_agent);
+
+ /* tell HTTP/1.1 servers not to keep the connection alive */
+ asprintf (&buf, "%sConnection: close\r\n", buf);
+
+- /* optionally send the host header info */
+- if (host_name)
+- asprintf (&buf, "%sHost: %s:%d\r\n", buf, host_name, server_port);
+-
+ /* optionally send any other header tag */
+ if (http_opt_headers_count) {
+ for (i = 0; i < http_opt_headers_count ; i++) {
Attachment:
pgpjJHBl8Ao49.pgp
Description: PGP signature