aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_curl.c
diff options
context:
space:
mode:
authorGravatar Andreas Baumann <mail@andreasbaumann.cc> 2022-01-27 10:00:58 +0100
committerGravatar Sven Nierlein <sven@nierlein.org> 2022-01-29 12:17:37 +0100
commitee2a60fc4e26828b115051564706f8fbc4c4b153 (patch)
treefe592945ebbbd82556820686f341a3070edb71d1 /plugins/check_curl.c
parent737412f7391ae430a51e8f2c2a3b1ab2d35a6394 (diff)
downloadmonitoring-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.c6
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)
char *new_url;
int res = phr_parse_response (header_buf->buf, header_buf->buflen,
- &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
+ &status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
headers, &nof_headers, 0);
location = get_header_value (headers, nof_headers, "location");
@@ -2200,7 +2200,7 @@ check_document_dates (const curlhelp_write_curlbuf *header_buf, char (*msg)[DEFA
size_t msglen;
int res = phr_parse_response (header_buf->buf, header_buf->buflen,
- &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
+ &status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
headers, &nof_headers, 0);
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
curlhelp_statusline status_line;
int res = phr_parse_response (header_buf->buf, header_buf->buflen,
- &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
+ &status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
headers, &nof_headers, 0);
content_length_s = get_header_value (headers, nof_headers, "content-length");