summaryrefslogtreecommitdiffstats
path: root/plugins/check_http.c
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-11-14 00:34:13 +0100
committerSven Nierlein <sven@nierlein.org>2023-01-07 18:34:46 +0100
commit3e63e61f6ae062fd1e8c8c962c0bb603cf88856c (patch)
tree18432f3219f0336e3aa04ac7a1517bfe59008a86 /plugins/check_http.c
parent1ac8f35301db3a5e3e77c06e487a28365c546e3f (diff)
downloadmonitoring-plugins-3e63e61f6ae062fd1e8c8c962c0bb603cf88856c.tar.gz
Fix chunked header detection regex
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r--plugins/check_http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 3e021c56..1f7bd0b3 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -1257,10 +1257,10 @@ int check_http(void) {
1257 1257
1258 // At this point we should test if the content is chunked and unchunk it, so 1258 // At this point we should test if the content is chunked and unchunk it, so
1259 // it can be searched (and possibly printed) 1259 // it can be searched (and possibly printed)
1260 const char *chunked_header_regex_string = "Transfer-Encoding:\\s*chunked\\s*"CRLF; 1260 const char *chunked_header_regex_string = "Transfer-Encoding: *chunked *";
1261 regex_t chunked_header_regex; 1261 regex_t chunked_header_regex;
1262 1262
1263 if (regcomp(&chunked_header_regex, chunked_header_regex_string, 0)) { 1263 if (regcomp(&chunked_header_regex, chunked_header_regex_string, REG_ICASE)) {
1264 die(STATE_UNKNOWN, "HTTP %s: %s\n", state_text(STATE_UNKNOWN), "Failed to compile chunked_header_regex regex"); 1264 die(STATE_UNKNOWN, "HTTP %s: %s\n", state_text(STATE_UNKNOWN), "Failed to compile chunked_header_regex regex");
1265 } 1265 }
1266 1266