From 3e63e61f6ae062fd1e8c8c962c0bb603cf88856c Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Mon, 14 Nov 2022 00:34:13 +0100 Subject: Fix chunked header detection regex --- plugins/check_http.c | 4 ++-- 1 file 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) { // At this point we should test if the content is chunked and unchunk it, so // it can be searched (and possibly printed) - const char *chunked_header_regex_string = "Transfer-Encoding:\\s*chunked\\s*"CRLF; + const char *chunked_header_regex_string = "Transfer-Encoding: *chunked *"; regex_t chunked_header_regex; - if (regcomp(&chunked_header_regex, chunked_header_regex_string, 0)) { + if (regcomp(&chunked_header_regex, chunked_header_regex_string, REG_ICASE)) { die(STATE_UNKNOWN, "HTTP %s: %s\n", state_text(STATE_UNKNOWN), "Failed to compile chunked_header_regex regex"); } -- cgit v1.2.3-74-g34f1