Browse files

Fixed bug #3571331, check_http converts semicolon to newline i…

…n -k

This commit fixes 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).
  • Loading branch information...
g0hl1n authored and Richard Leitner committed May 29, 2013
1 parent 1fd504b commit 14225eb4641af25f3317e4ee3d8af7007b55bf42
Showing with 1 addition and 3 deletions.
  1. +1 −3 plugins/check_http.c
@@ -43,7 +43,6 @@ const char *email = "";
#include "base64.h"
#include <ctype.h>
#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 */

0 comments on commit 14225eb

Please sign in to comment.