Преглед на файлове

Merge pull request #52 from g0hl1n/sf_3571331_check_http_-_removed_semicolon_delimiter_in_-k

Fixed SF.net bug #3571331, check_http converts semicolon to newline in -k
Sven Nierlein преди 12 години
родител
ревизия
5815864e6c
променени са 1 файла, в които са добавени 1 реда и са изтрити 3 реда
  1. 1 3
      plugins/check_http.c

+ 1 - 3
plugins/check_http.c

@@ -43,7 +43,6 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
 #include "base64.h"
 #include "base64.h"
 #include <ctype.h>
 #include <ctype.h>
 
 
-#define INPUT_DELIMITER ";"
 #define STICKY_NONE 0
 #define STICKY_NONE 0
 #define STICKY_HOST 1
 #define STICKY_HOST 1
 #define STICKY_PORT 2
 #define STICKY_PORT 2
@@ -854,8 +853,7 @@ check_http (void)
   /* optionally send any other header tag */
   /* optionally send any other header tag */
   if (http_opt_headers_count) {
   if (http_opt_headers_count) {
     for (i = 0; i < http_opt_headers_count ; i++) {
     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 */
     /* 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 */
     /* Covered in a testcase in tests/check_http.t */