diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-10-30 22:23:51 +0100 | 
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-10-30 22:23:51 +0100 | 
| commit | 6abf609ed91ab9b8e2c1fac0058d034ceef5f0e8 (patch) | |
| tree | 76c83fb974bd96a8c5187e8e9b0b775e68068b9a /plugins/check_curl.d | |
| parent | 669edf2afca4d3674019bceb037b0ccc2d938b2a (diff) | |
| download | monitoring-plugins-6abf609ed91ab9b8e2c1fac0058d034ceef5f0e8.tar.gz | |
add some comments to explain changed code
Diffstat (limited to 'plugins/check_curl.d')
| -rw-r--r-- | plugins/check_curl.d/check_curl_helpers.c | 2 | 
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) { | 
