From eb7432cdf32afa1a8f89c87d398bc1aaa6279192 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 13 Apr 2021 12:22:22 +0200 Subject: [PATCH] Adding d/p/10_check_curl_header fixing HTTP_ heqders --- debian/patches/10_check_curl_header | 23 +++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 24 insertions(+) create mode 100644 debian/patches/10_check_curl_header diff --git a/debian/patches/10_check_curl_header b/debian/patches/10_check_curl_header new file mode 100644 index 0000000..8b5e2ba --- /dev/null +++ b/debian/patches/10_check_curl_header @@ -0,0 +1,23 @@ +From f0ac7fcc7c40fab04c00fbbc8c091e89e77b0f74 Mon Sep 17 00:00:00 2001 +From: Barak Shohat +Date: Mon, 12 Apr 2021 19:06:27 +0300 +Subject: [PATCH] check_curl: Fix bug where headers beginning with HTTP_ cause + the status line parsing to fail. + +--- + plugins/check_curl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/check_curl.c b/plugins/check_curl.c +index 99833f6f..3e0a6f94 100644 +--- a/plugins/check_curl.c ++++ b/plugins/check_curl.c +@@ -1995,7 +1995,7 @@ curlhelp_parse_statusline (const char *buf, curlhelp_statusline *status_line) + char *first_line_buf; + + /* find last start of a new header */ +- start = strrstr2 (buf, "\r\nHTTP"); ++ start = strrstr2 (buf, "\r\nHTTP/"); + if (start != NULL) { + start += 2; + buf = start; diff --git a/debian/patches/series b/debian/patches/series index de39cb6..3f69e00 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 02_check_icmp_links # commited upstream +10_check_curl_header