[nagiosplug] Fixed SF.net bug #3571331, check_http converts ...
"Nagios Plugin Development" <[email protected]> Thu, 15 Aug 2013 09:00:23 +0000
| Newsgroups | gmane.network.nagios.plugins.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module: nagiosplug
Branch: master
Commit: 14225eb4641af25f3317e4ee3d8af7007b55bf42
Author: Richard Leitner <[email protected]>
Committer: Richard Leitner <[email protected]>
Date: Wed May 29 15:02:15 2013 +0200
URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=14225eb
Fixed SF.net bug #3571331, check_http converts semicolon to newline in -k
This commit fixes sourceforge.net bug id 3571331.
The semicolon was defined as input delimiter for multiple values in the -k arguments.
Due to the fact the semicolon is a valid character for HTTP header fields this input delimiter function was removed.
It is still possible to pass multiple header fields via multiple -k (like described in helptext).
---
plugins/check_http.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 9231a55..110875d 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -43,7 +43,6 @@ const char *email = "[email protected]";
#include "base64.h"
#include <ctype.h>
-#define INPUT_DELIMITER ";"
#define STICKY_NONE 0
#define STICKY_HOST 1
#define STICKY_PORT 2
@@ -854,8 +853,7 @@ check_http (void)
/* optionally send any other header tag */
if (http_opt_headers_count) {
for (i = 0; i < http_opt_headers_count ; i++) {
- for ((pos = strtok(http_opt_headers[i], INPUT_DELIMITER)); pos; (pos = strtok(NULL, INPUT_DELIMITER)))
- xasprintf (&buf, "%s%s\r\n", buf, pos);
+ xasprintf (&buf, "%s%s\r\n", buf, http_opt_headers[i]);
}
/* This cannot be free'd here because a redirection will then try to access this and segfault */
/* Covered in a testcase in tests/check_http.t */
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk