mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-28 04:35:40 -04:00
Merge pull request #2185 from RincewindsHat/fix/curl_segfault
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Spellcheck / codespell (push) Waiting to run
Tests / Running unit and integrationt tests (push) Waiting to run
Tests / Running rpm build test on almalinux:9 (push) Waiting to run
Tests / Running rpm build test on fedora:latest (push) Waiting to run
Tests / Running rpm build test on rockylinux:8 (push) Waiting to run
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Spellcheck / codespell (push) Waiting to run
Tests / Running unit and integrationt tests (push) Waiting to run
Tests / Running rpm build test on almalinux:9 (push) Waiting to run
Tests / Running rpm build test on fedora:latest (push) Waiting to run
Tests / Running rpm build test on rockylinux:8 (push) Waiting to run
check_curl: abort redir if location is not found
This commit is contained in:
commit
6c231f0dd8
1 changed files with 5 additions and 0 deletions
|
|
@ -672,6 +672,11 @@ redir_wrapper redir(curlhelp_write_curlbuf *header_buf, const check_curl_config
|
|||
|
||||
char *location = get_header_value(headers, nof_headers, "location");
|
||||
|
||||
if (location == NULL) {
|
||||
// location header not found
|
||||
die(STATE_UNKNOWN, "HTTP UNKNOWN - could not find \"location\" header\n");
|
||||
}
|
||||
|
||||
if (verbose >= 2) {
|
||||
printf(_("* Seen redirect location %s\n"), location);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue