summaryrefslogtreecommitdiffstats
path: root/plugins/check_curl.d/check_curl_helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_curl.d/check_curl_helpers.c')
-rw-r--r--plugins/check_curl.d/check_curl_helpers.c2
1 files changed, 2 insertions, 0 deletions
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)
817 buf = start; 817 buf = start;
818 } 818 }
819 819
820 // Accept either LF or CRLF as end of line for the status line
821 // CRLF is the standard (RFC9112), but it is recommended to accept both
820 size_t length_of_first_line = strcspn(buf, "\r\n"); 822 size_t length_of_first_line = strcspn(buf, "\r\n");
821 const char *first_line_end = &buf[length_of_first_line]; 823 const char *first_line_end = &buf[length_of_first_line];
822 if (first_line_end == NULL) { 824 if (first_line_end == NULL) {