diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2022-01-27 10:00:58 +0100 |
---|---|---|
committer | Sven Nierlein <sven@nierlein.org> | 2022-01-29 12:17:37 +0100 |
commit | ee2a60fc4e26828b115051564706f8fbc4c4b153 (patch) | |
tree | fe592945ebbbd82556820686f341a3070edb71d1 /plugins/check_curl.c | |
parent | 737412f7391ae430a51e8f2c2a3b1ab2d35a6394 (diff) | |
download | monitoring-plugins-ee2a60fc4e26828b115051564706f8fbc4c4b153.tar.gz |
fixed -ffollow for HTTP/2.0 (Fixes #1685): added major_version parsing to PicoHTTPParser
Diffstat (limited to 'plugins/check_curl.c')
-rw-r--r-- | plugins/check_curl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index 32d919fe..7da84de4 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
@@ -1054,7 +1054,7 @@ redir (curlhelp_write_curlbuf* header_buf) | |||
1054 | char *new_url; | 1054 | char *new_url; |
1055 | 1055 | ||
1056 | int res = phr_parse_response (header_buf->buf, header_buf->buflen, | 1056 | int res = phr_parse_response (header_buf->buf, header_buf->buflen, |
1057 | &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen, | 1057 | &status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen, |
1058 | headers, &nof_headers, 0); | 1058 | headers, &nof_headers, 0); |
1059 | 1059 | ||
1060 | location = get_header_value (headers, nof_headers, "location"); | 1060 | location = get_header_value (headers, nof_headers, "location"); |
@@ -2200,7 +2200,7 @@ check_document_dates (const curlhelp_write_curlbuf *header_buf, char (*msg)[DEFA | |||
2200 | size_t msglen; | 2200 | size_t msglen; |
2201 | 2201 | ||
2202 | int res = phr_parse_response (header_buf->buf, header_buf->buflen, | 2202 | int res = phr_parse_response (header_buf->buf, header_buf->buflen, |
2203 | &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen, | 2203 | &status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen, |
2204 | headers, &nof_headers, 0); | 2204 | headers, &nof_headers, 0); |
2205 | 2205 | ||
2206 | server_date = get_header_value (headers, nof_headers, "date"); | 2206 | server_date = get_header_value (headers, nof_headers, "date"); |
@@ -2258,7 +2258,7 @@ get_content_length (const curlhelp_write_curlbuf* header_buf, const curlhelp_wri | |||
2258 | curlhelp_statusline status_line; | 2258 | curlhelp_statusline status_line; |
2259 | 2259 | ||
2260 | int res = phr_parse_response (header_buf->buf, header_buf->buflen, | 2260 | int res = phr_parse_response (header_buf->buf, header_buf->buflen, |
2261 | &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen, | 2261 | &status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen, |
2262 | headers, &nof_headers, 0); | 2262 | headers, &nof_headers, 0); |
2263 | 2263 | ||
2264 | content_length_s = get_header_value (headers, nof_headers, "content-length"); | 2264 | content_length_s = get_header_value (headers, nof_headers, "content-length"); |