summaryrefslogtreecommitdiffstats
path: root/plugins/check_curl.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_curl.c')
-rw-r--r--plugins/check_curl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index 0784fb8b..485a8744 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -1139,7 +1139,7 @@ mp_state_enum check_http(const check_curl_config config, check_curl_working_stat
1139 } 1139 }
1140 1140
1141 /* make sure the status line matches the response we are looking for */ 1141 /* make sure the status line matches the response we are looking for */
1142 if (!expected_statuscode(global_state.status_line.first_line, config.server_expect)) { 1142 if (!expected_statuscode(global_state.status_line.first_line, config.server_expect.string)) {
1143 if (workingState.serverPort == HTTP_PORT) { 1143 if (workingState.serverPort == HTTP_PORT) {
1144 snprintf(msg, DEFAULT_BUFFER_SIZE, _("Invalid HTTP response received from host: %s\n"), 1144 snprintf(msg, DEFAULT_BUFFER_SIZE, _("Invalid HTTP response received from host: %s\n"),
1145 global_state.status_line.first_line); 1145 global_state.status_line.first_line);
@@ -1153,7 +1153,7 @@ mp_state_enum check_http(const check_curl_config config, check_curl_working_stat
1153 } 1153 }
1154 1154
1155 mp_state_enum result = STATE_OK; 1155 mp_state_enum result = STATE_OK;
1156 if (config.server_expect_yn) { 1156 if (config.server_expect.is_present) {
1157 snprintf(msg, DEFAULT_BUFFER_SIZE, _("Status line output matched \"%s\" - "), 1157 snprintf(msg, DEFAULT_BUFFER_SIZE, _("Status line output matched \"%s\" - "),
1158 config.server_expect); 1158 config.server_expect);
1159 if (verbose) { 1159 if (verbose) {
@@ -1893,9 +1893,9 @@ check_curl_config_wrapper process_arguments(int argc, char **argv) {
1893 result.config.string_expect[MAX_INPUT_BUFFER - 1] = 0; 1893 result.config.string_expect[MAX_INPUT_BUFFER - 1] = 0;
1894 break; 1894 break;
1895 case 'e': /* string or substring */ 1895 case 'e': /* string or substring */
1896 strncpy(result.config.server_expect, optarg, MAX_INPUT_BUFFER - 1); 1896 strncpy(result.config.server_expect.string, optarg, MAX_INPUT_BUFFER - 1);
1897 result.config.server_expect[MAX_INPUT_BUFFER - 1] = 0; 1897 result.config.server_expect.string[MAX_INPUT_BUFFER - 1] = 0;
1898 result.config.server_expect_yn = true; 1898 result.config.server_expect.is_present = true;
1899 break; 1899 break;
1900 case 'T': /* Content-type */ 1900 case 'T': /* Content-type */
1901 result.config.http_content_type = strdup(optarg); 1901 result.config.http_content_type = strdup(optarg);