diff options
Diffstat (limited to 'plugins/check_curl.c')
| -rw-r--r-- | plugins/check_curl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index fc704171..4eaa5f1d 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
| @@ -672,6 +672,11 @@ redir_wrapper redir(curlhelp_write_curlbuf *header_buf, const check_curl_config | |||
| 672 | 672 | ||
| 673 | char *location = get_header_value(headers, nof_headers, "location"); | 673 | char *location = get_header_value(headers, nof_headers, "location"); |
| 674 | 674 | ||
| 675 | if (location == NULL) { | ||
| 676 | // location header not found | ||
| 677 | die(STATE_UNKNOWN, "HTTP UNKNOWN - could not find \"location\" header\n"); | ||
| 678 | } | ||
| 679 | |||
| 675 | if (verbose >= 2) { | 680 | if (verbose >= 2) { |
| 676 | printf(_("* Seen redirect location %s\n"), location); | 681 | printf(_("* Seen redirect location %s\n"), location); |
| 677 | } | 682 | } |
