[monitoring-plugins] add some comments to explain changed code

Lorenz Kästle git at monitoring-plugins.org
Fri Oct 31 12:40:12 CET 2025


 Module: monitoring-plugins
 Branch: master
 Commit: 6abf609ed91ab9b8e2c1fac0058d034ceef5f0e8
 Author: Lorenz Kästle <12514511+RincewindsHat at users.noreply.github.com>
   Date: Thu Oct 30 22:23:51 2025 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=6abf609e

add some comments to explain changed code

---

 plugins/check_curl.d/check_curl_helpers.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/plugins/check_curl.d/check_curl_helpers.c b/plugins/check_curl.d/check_curl_helpers.c
index d1d282be..d49d8f07 100644
--- a/plugins/check_curl.d/check_curl_helpers.c
+++ b/plugins/check_curl.d/check_curl_helpers.c
@@ -817,6 +817,8 @@ int curlhelp_parse_statusline(const char *buf, curlhelp_statusline *status_line)
 		buf = start;
 	}
 
+	// Accept either LF or CRLF as end of line for the status line
+	// CRLF is the standard (RFC9112), but it is recommended to accept both
 	size_t length_of_first_line = strcspn(buf, "\r\n");
 	const char *first_line_end = &buf[length_of_first_line];
 	if (first_line_end == NULL) {



More information about the Commits mailing list