summaryrefslogtreecommitdiffstats
path: root/plugins/check_http.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r--plugins/check_http.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 8dda046..718c8ee 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -198,7 +198,7 @@ test_file (char *path)
198 198
199/* 199/*
200 * process command-line arguments 200 * process command-line arguments
201 * returns true on succes, false otherwise 201 * returns true on success, false otherwise
202 */ 202 */
203bool process_arguments (int argc, char **argv) 203bool process_arguments (int argc, char **argv)
204{ 204{
@@ -498,6 +498,7 @@ bool process_arguments (int argc, char **argv)
498 break; 498 break;
499 case 'R': /* regex */ 499 case 'R': /* regex */
500 cflags |= REG_ICASE; 500 cflags |= REG_ICASE;
501 // fall through
501 case 'r': /* regex */ 502 case 'r': /* regex */
502 strncpy (regexp, optarg, MAX_RE_SIZE - 1); 503 strncpy (regexp, optarg, MAX_RE_SIZE - 1);
503 regexp[MAX_RE_SIZE - 1] = 0; 504 regexp[MAX_RE_SIZE - 1] = 0;
@@ -1278,7 +1279,7 @@ check_http (void)
1278 1279
1279 regmatch_t chre_pmatch[1]; // We actually do not care about this, since we only want to know IF it was found 1280 regmatch_t chre_pmatch[1]; // We actually do not care about this, since we only want to know IF it was found
1280 1281
1281 if (regexec(&chunked_header_regex, header, 1, chre_pmatch, 0) == 0) { 1282 if (!no_body && regexec(&chunked_header_regex, header, 1, chre_pmatch, 0) == 0) {
1282 if (verbose) { 1283 if (verbose) {
1283 printf("Found chunked content\n"); 1284 printf("Found chunked content\n");
1284 } 1285 }
@@ -1391,7 +1392,6 @@ char *unchunk_content(const char *content) {
1391 // https://en.wikipedia.org/wiki/Chunked_transfer_encoding 1392 // https://en.wikipedia.org/wiki/Chunked_transfer_encoding
1392 // https://www.rfc-editor.org/rfc/rfc7230#section-4.1 1393 // https://www.rfc-editor.org/rfc/rfc7230#section-4.1
1393 char *result = NULL; 1394 char *result = NULL;
1394 size_t content_length = strlen(content);
1395 char *start_of_chunk; 1395 char *start_of_chunk;
1396 char* end_of_chunk; 1396 char* end_of_chunk;
1397 long size_of_chunk; 1397 long size_of_chunk;
@@ -1885,7 +1885,7 @@ print_usage (void)
1885 printf (" %s -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]\n",progname); 1885 printf (" %s -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]\n",progname);
1886 printf (" [-J <client certificate file>] [-K <private key>]\n"); 1886 printf (" [-J <client certificate file>] [-K <private key>]\n");
1887 printf (" [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L] [-E] [-a auth]\n"); 1887 printf (" [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L] [-E] [-a auth]\n");
1888 printf (" [-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport>]\n"); 1888 printf (" [-b proxy_auth] [-f <ok|warning|critical|follow|sticky|stickyport>]\n");
1889 printf (" [-e <expect>] [-d string] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n"); 1889 printf (" [-e <expect>] [-d string] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n");
1890 printf (" [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n"); 1890 printf (" [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n");
1891 printf (" [-A string] [-k string] [-S <version>] [--sni]\n"); 1891 printf (" [-A string] [-k string] [-S <version>] [--sni]\n");