From a514dc4708b3e791037191909aaa9fdb885ebe52 Mon Sep 17 00:00:00 2001
From: Barak Shohat <barak@bazzisoft.com>
Date: Mon, 12 Apr 2021 19:06:27 +0300
Subject: check_curl: Fix bug where headers beginning with HTTP_ cause the
 status line parsing to fail.


diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index 99833f6..3e0a6f9 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;
-- 
cgit v0.10-9-g596f

