summaryrefslogtreecommitdiffstats
path: root/plugins/check_http.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r--plugins/check_http.c120
1 files changed, 95 insertions, 25 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 2038f4a..34fb4f0 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -72,7 +72,7 @@ int maximum_age = -1;
72 72
73enum { 73enum {
74 REGS = 2, 74 REGS = 2,
75 MAX_RE_SIZE = 256 75 MAX_RE_SIZE = 1024
76}; 76};
77#include "regex.h" 77#include "regex.h"
78regex_t preg; 78regex_t preg;
@@ -91,10 +91,12 @@ struct timeval tv_temp;
91 91
92int specify_port = FALSE; 92int specify_port = FALSE;
93int server_port = HTTP_PORT; 93int server_port = HTTP_PORT;
94int virtual_port = 0;
94char server_port_text[6] = ""; 95char server_port_text[6] = "";
95char server_type[6] = "http"; 96char server_type[6] = "http";
96char *server_address; 97char *server_address;
97char *host_name; 98char *host_name;
99int host_name_length;
98char *server_url; 100char *server_url;
99char *user_agent; 101char *user_agent;
100int server_url_length; 102int server_url_length;
@@ -118,12 +120,14 @@ int use_ssl = FALSE;
118int use_sni = FALSE; 120int use_sni = FALSE;
119int verbose = FALSE; 121int verbose = FALSE;
120int show_extended_perfdata = FALSE; 122int show_extended_perfdata = FALSE;
123int show_body = FALSE;
121int sd; 124int sd;
122int min_page_len = 0; 125int min_page_len = 0;
123int max_page_len = 0; 126int max_page_len = 0;
124int redir_depth = 0; 127int redir_depth = 0;
125int max_depth = 15; 128int max_depth = 15;
126char *http_method; 129char *http_method;
130char *http_method_proxy;
127char *http_post_data; 131char *http_post_data;
128char *http_content_type; 132char *http_content_type;
129char buffer[MAX_INPUT_BUFFER]; 133char buffer[MAX_INPUT_BUFFER];
@@ -237,6 +241,7 @@ process_arguments (int argc, char **argv)
237 {"use-ipv4", no_argument, 0, '4'}, 241 {"use-ipv4", no_argument, 0, '4'},
238 {"use-ipv6", no_argument, 0, '6'}, 242 {"use-ipv6", no_argument, 0, '6'},
239 {"extended-perfdata", no_argument, 0, 'E'}, 243 {"extended-perfdata", no_argument, 0, 'E'},
244 {"show-body", no_argument, 0, 'B'},
240 {0, 0, 0, 0} 245 {0, 0, 0, 0}
241 }; 246 };
242 247
@@ -257,7 +262,7 @@ process_arguments (int argc, char **argv)
257 } 262 }
258 263
259 while (1) { 264 while (1) {
260 c = getopt_long (argc, argv, "Vvh46t:c:w:A:k:H:P:j:T:I:a:b:d:e:p:s:R:r:u:f:C:J:K:nlLS::m:M:NE", longopts, &option); 265 c = getopt_long (argc, argv, "Vvh46t:c:w:A:k:H:P:j:T:I:a:b:d:e:p:s:R:r:u:f:C:J:K:nlLS::m:M:NEB", longopts, &option);
261 if (c == -1 || c == EOF) 266 if (c == -1 || c == EOF)
262 break; 267 break;
263 268
@@ -391,11 +396,25 @@ process_arguments (int argc, char **argv)
391 case 'H': /* Host Name (virtual host) */ 396 case 'H': /* Host Name (virtual host) */
392 host_name = strdup (optarg); 397 host_name = strdup (optarg);
393 if (host_name[0] == '[') { 398 if (host_name[0] == '[') {
394 if ((p = strstr (host_name, "]:")) != NULL) /* [IPv6]:port */ 399 if ((p = strstr (host_name, "]:")) != NULL) { /* [IPv6]:port */
395 server_port = atoi (p + 2); 400 virtual_port = atoi (p + 2);
401 /* cut off the port */
402 host_name_length = strlen (host_name) - strlen (p) - 1;
403 free (host_name);
404 host_name = strndup (optarg, host_name_length);
405 if (specify_port == FALSE)
406 server_port = virtual_port;
407 }
396 } else if ((p = strchr (host_name, ':')) != NULL 408 } else if ((p = strchr (host_name, ':')) != NULL
397 && strchr (++p, ':') == NULL) /* IPv4:port or host:port */ 409 && strchr (++p, ':') == NULL) { /* IPv4:port or host:port */
398 server_port = atoi (p); 410 virtual_port = atoi (p);
411 /* cut off the port */
412 host_name_length = strlen (host_name) - strlen (p) - 1;
413 free (host_name);
414 host_name = strndup (optarg, host_name_length);
415 if (specify_port == FALSE)
416 server_port = virtual_port;
417 }
399 break; 418 break;
400 case 'I': /* Server IP-address */ 419 case 'I': /* Server IP-address */
401 server_address = strdup (optarg); 420 server_address = strdup (optarg);
@@ -430,6 +449,12 @@ process_arguments (int argc, char **argv)
430 if (http_method) 449 if (http_method)
431 free(http_method); 450 free(http_method);
432 http_method = strdup (optarg); 451 http_method = strdup (optarg);
452 char *tmp;
453 if ((tmp = strstr(http_method, ":")) > 0) {
454 tmp[0] = '\0';
455 http_method = http_method;
456 http_method_proxy = ++tmp;
457 }
433 break; 458 break;
434 case 'd': /* string or substring */ 459 case 'd': /* string or substring */
435 strncpy (header_expect, optarg, MAX_INPUT_BUFFER - 1); 460 strncpy (header_expect, optarg, MAX_INPUT_BUFFER - 1);
@@ -524,6 +549,9 @@ process_arguments (int argc, char **argv)
524 case 'E': /* show extended perfdata */ 549 case 'E': /* show extended perfdata */
525 show_extended_perfdata = TRUE; 550 show_extended_perfdata = TRUE;
526 break; 551 break;
552 case 'B': /* print body content after status line */
553 show_body = TRUE;
554 break;
527 } 555 }
528 } 556 }
529 557
@@ -550,9 +578,15 @@ process_arguments (int argc, char **argv)
550 if (http_method == NULL) 578 if (http_method == NULL)
551 http_method = strdup ("GET"); 579 http_method = strdup ("GET");
552 580
553 if (client_cert && !client_privkey) 581 if (http_method_proxy == NULL)
582 http_method_proxy = strdup ("GET");
583
584 if (client_cert && !client_privkey)
554 usage4 (_("If you use a client certificate you must also specify a private key file")); 585 usage4 (_("If you use a client certificate you must also specify a private key file"));
555 586
587 if (virtual_port == 0)
588 virtual_port = server_port;
589
556 return TRUE; 590 return TRUE;
557} 591}
558 592
@@ -897,6 +931,21 @@ check_http (void)
897 931
898 if (verbose) printf ("Entering CONNECT tunnel mode with proxy %s:%d to dst %s:%d\n", server_address, server_port, host_name, HTTPS_PORT); 932 if (verbose) printf ("Entering CONNECT tunnel mode with proxy %s:%d to dst %s:%d\n", server_address, server_port, host_name, HTTPS_PORT);
899 asprintf (&buf, "%s %s:%d HTTP/1.1\r\n%s\r\n", http_method, host_name, HTTPS_PORT, user_agent); 933 asprintf (&buf, "%s %s:%d HTTP/1.1\r\n%s\r\n", http_method, host_name, HTTPS_PORT, user_agent);
934 if (strlen(proxy_auth)) {
935 base64_encode_alloc (proxy_auth, strlen (proxy_auth), &auth);
936 xasprintf (&buf, "%sProxy-Authorization: Basic %s\r\n", buf, auth);
937 }
938 /* optionally send any other header tag */
939 if (http_opt_headers_count) {
940 for (i = 0; i < http_opt_headers_count ; i++) {
941 if (force_host_header != http_opt_headers[i]) {
942 xasprintf (&buf, "%s%s\r\n", buf, http_opt_headers[i]);
943 }
944 }
945 /* This cannot be free'd here because a redirection will then try to access this and segfault */
946 /* Covered in a testcase in tests/check_http.t */
947 /* free(http_opt_headers); */
948 }
900 asprintf (&buf, "%sProxy-Connection: keep-alive\r\n", buf); 949 asprintf (&buf, "%sProxy-Connection: keep-alive\r\n", buf);
901 asprintf (&buf, "%sHost: %s\r\n", buf, host_name); 950 asprintf (&buf, "%sHost: %s\r\n", buf, host_name);
902 /* we finished our request, send empty line with CRLF */ 951 /* we finished our request, send empty line with CRLF */
@@ -922,8 +971,8 @@ check_http (void)
922 elapsed_time_ssl = (double)microsec_ssl / 1.0e6; 971 elapsed_time_ssl = (double)microsec_ssl / 1.0e6;
923 if (check_cert == TRUE) { 972 if (check_cert == TRUE) {
924 result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit); 973 result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit);
925 np_net_ssl_cleanup();
926 if (sd) close(sd); 974 if (sd) close(sd);
975 np_net_ssl_cleanup();
927 return result; 976 return result;
928 } 977 }
929 } 978 }
@@ -931,7 +980,7 @@ check_http (void)
931 980
932 if ( server_address != NULL && strcmp(http_method, "CONNECT") == 0 981 if ( server_address != NULL && strcmp(http_method, "CONNECT") == 0
933 && host_name != NULL && use_ssl == TRUE) 982 && host_name != NULL && use_ssl == TRUE)
934 asprintf (&buf, "%s %s %s\r\n%s\r\n", "GET", server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent); 983 asprintf (&buf, "%s %s %s\r\n%s\r\n", http_method_proxy, server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent);
935 else 984 else
936 asprintf (&buf, "%s %s %s\r\n%s\r\n", http_method, server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent); 985 asprintf (&buf, "%s %s %s\r\n%s\r\n", http_method, server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent);
937 986
@@ -958,13 +1007,13 @@ check_http (void)
958 * 14.23). Some server applications/configurations cause trouble if the 1007 * 14.23). Some server applications/configurations cause trouble if the
959 * (default) port is explicitly specified in the "Host:" header line. 1008 * (default) port is explicitly specified in the "Host:" header line.
960 */ 1009 */
961 if ((use_ssl == FALSE && server_port == HTTP_PORT) || 1010 if ((use_ssl == FALSE && virtual_port == HTTP_PORT) ||
962 (use_ssl == TRUE && server_port == HTTPS_PORT) || 1011 (use_ssl == TRUE && virtual_port == HTTPS_PORT) ||
963 (server_address != NULL && strcmp(http_method, "CONNECT") == 0 1012 (server_address != NULL && strcmp(http_method, "CONNECT") == 0
964 && host_name != NULL && use_ssl == TRUE)) 1013 && host_name != NULL && use_ssl == TRUE))
965 xasprintf (&buf, "%sHost: %s\r\n", buf, host_name); 1014 xasprintf (&buf, "%sHost: %s\r\n", buf, host_name);
966 else 1015 else
967 xasprintf (&buf, "%sHost: %s:%d\r\n", buf, host_name, server_port); 1016 xasprintf (&buf, "%sHost: %s:%d\r\n", buf, host_name, virtual_port);
968 } 1017 }
969 } 1018 }
970 1019
@@ -1022,6 +1071,10 @@ check_http (void)
1022 microsec_firstbyte = deltime (tv_temp); 1071 microsec_firstbyte = deltime (tv_temp);
1023 elapsed_time_firstbyte = (double)microsec_firstbyte / 1.0e6; 1072 elapsed_time_firstbyte = (double)microsec_firstbyte / 1.0e6;
1024 } 1073 }
1074 while (pos = memchr(buffer, '\0', i)) {
1075 /* replace nul character with a blank */
1076 *pos = ' ';
1077 }
1025 buffer[i] = '\0'; 1078 buffer[i] = '\0';
1026 xasprintf (&full_page_new, "%s%s", full_page, buffer); 1079 xasprintf (&full_page_new, "%s%s", full_page, buffer);
1027 free (full_page); 1080 free (full_page);
@@ -1063,10 +1116,10 @@ check_http (void)
1063 die (STATE_CRITICAL, _("HTTP CRITICAL - No data received from host\n")); 1116 die (STATE_CRITICAL, _("HTTP CRITICAL - No data received from host\n"));
1064 1117
1065 /* close the connection */ 1118 /* close the connection */
1119 if (sd) close(sd);
1066#ifdef HAVE_SSL 1120#ifdef HAVE_SSL
1067 np_net_ssl_cleanup(); 1121 np_net_ssl_cleanup();
1068#endif 1122#endif
1069 if (sd) close(sd);
1070 1123
1071 /* Save check time */ 1124 /* Save check time */
1072 microsec = deltime (tv); 1125 microsec = deltime (tv);
@@ -1117,6 +1170,8 @@ check_http (void)
1117 xasprintf (&msg, 1170 xasprintf (&msg,
1118 _("Invalid HTTP response received from host on port %d: %s\n"), 1171 _("Invalid HTTP response received from host on port %d: %s\n"),
1119 server_port, status_line); 1172 server_port, status_line);
1173 if (show_body)
1174 xasprintf (&msg, _("%s\n%s"), msg, page);
1120 die (STATE_CRITICAL, "HTTP CRITICAL - %s", msg); 1175 die (STATE_CRITICAL, "HTTP CRITICAL - %s", msg);
1121 } 1176 }
1122 1177
@@ -1267,6 +1322,9 @@ check_http (void)
1267 perfd_time (elapsed_time), 1322 perfd_time (elapsed_time),
1268 perfd_size (page_len)); 1323 perfd_size (page_len));
1269 1324
1325 if (show_body)
1326 xasprintf (&msg, _("%s\n%s"), msg, page);
1327
1270 result = max_state_alt(get_status(elapsed_time, thlds), result); 1328 result = max_state_alt(get_status(elapsed_time, thlds), result);
1271 1329
1272 die (result, "HTTP %s: %s\n", state_text(result), msg); 1330 die (result, "HTTP %s: %s\n", state_text(result), msg);
@@ -1395,8 +1453,8 @@ redir (char *pos, char *status_line)
1395 !strncmp(server_address, addr, MAX_IPV4_HOSTLENGTH) && 1453 !strncmp(server_address, addr, MAX_IPV4_HOSTLENGTH) &&
1396 (host_name && !strncmp(host_name, addr, MAX_IPV4_HOSTLENGTH)) && 1454 (host_name && !strncmp(host_name, addr, MAX_IPV4_HOSTLENGTH)) &&
1397 !strcmp(server_url, url)) 1455 !strcmp(server_url, url))
1398 die (STATE_WARNING, 1456 die (STATE_CRITICAL,
1399 _("HTTP WARNING - redirection creates an infinite loop - %s://%s:%d%s%s\n"), 1457 _("HTTP CRITICAL - redirection creates an infinite loop - %s://%s:%d%s%s\n"),
1400 type, addr, i, url, (display_html ? "</A>" : "")); 1458 type, addr, i, url, (display_html ? "</A>" : ""));
1401 1459
1402 strcpy (server_type, type); 1460 strcpy (server_type, type);
@@ -1421,6 +1479,9 @@ redir (char *pos, char *status_line)
1421 MAX_PORT, server_type, server_address, server_port, server_url, 1479 MAX_PORT, server_type, server_address, server_port, server_url,
1422 display_html ? "</A>" : ""); 1480 display_html ? "</A>" : "");
1423 1481
1482 /* reset virtual port */
1483 virtual_port = server_port;
1484
1424 if (verbose) 1485 if (verbose)
1425 printf (_("Redirection to %s://%s:%d%s\n"), server_type, 1486 printf (_("Redirection to %s://%s:%d%s\n"), server_type,
1426 host_name ? host_name : server_address, server_port, server_url); 1487 host_name ? host_name : server_address, server_port, server_url);
@@ -1453,32 +1514,32 @@ char *perfd_time (double elapsed_time)
1453 return fperfdata ("time", elapsed_time, "s", 1514 return fperfdata ("time", elapsed_time, "s",
1454 thlds->warning?TRUE:FALSE, thlds->warning?thlds->warning->end:0, 1515 thlds->warning?TRUE:FALSE, thlds->warning?thlds->warning->end:0,
1455 thlds->critical?TRUE:FALSE, thlds->critical?thlds->critical->end:0, 1516 thlds->critical?TRUE:FALSE, thlds->critical?thlds->critical->end:0,
1456 TRUE, 0, FALSE, 0); 1517 TRUE, 0, TRUE, socket_timeout);
1457} 1518}
1458 1519
1459char *perfd_time_connect (double elapsed_time_connect) 1520char *perfd_time_connect (double elapsed_time_connect)
1460{ 1521{
1461 return fperfdata ("time_connect", elapsed_time_connect, "s", FALSE, 0, FALSE, 0, FALSE, 0, FALSE, 0); 1522 return fperfdata ("time_connect", elapsed_time_connect, "s", FALSE, 0, FALSE, 0, FALSE, 0, TRUE, socket_timeout);
1462} 1523}
1463 1524
1464char *perfd_time_ssl (double elapsed_time_ssl) 1525char *perfd_time_ssl (double elapsed_time_ssl)
1465{ 1526{
1466 return fperfdata ("time_ssl", elapsed_time_ssl, "s", FALSE, 0, FALSE, 0, FALSE, 0, FALSE, 0); 1527 return fperfdata ("time_ssl", elapsed_time_ssl, "s", FALSE, 0, FALSE, 0, FALSE, 0, TRUE, socket_timeout);
1467} 1528}
1468 1529
1469char *perfd_time_headers (double elapsed_time_headers) 1530char *perfd_time_headers (double elapsed_time_headers)
1470{ 1531{
1471 return fperfdata ("time_headers", elapsed_time_headers, "s", FALSE, 0, FALSE, 0, FALSE, 0, FALSE, 0); 1532 return fperfdata ("time_headers", elapsed_time_headers, "s", FALSE, 0, FALSE, 0, FALSE, 0, TRUE, socket_timeout);
1472} 1533}
1473 1534
1474char *perfd_time_firstbyte (double elapsed_time_firstbyte) 1535char *perfd_time_firstbyte (double elapsed_time_firstbyte)
1475{ 1536{
1476 return fperfdata ("time_firstbyte", elapsed_time_firstbyte, "s", FALSE, 0, FALSE, 0, FALSE, 0, FALSE, 0); 1537 return fperfdata ("time_firstbyte", elapsed_time_firstbyte, "s", FALSE, 0, FALSE, 0, FALSE, 0, TRUE, socket_timeout);
1477} 1538}
1478 1539
1479char *perfd_time_transfer (double elapsed_time_transfer) 1540char *perfd_time_transfer (double elapsed_time_transfer)
1480{ 1541{
1481 return fperfdata ("time_transfer", elapsed_time_transfer, "s", FALSE, 0, FALSE, 0, FALSE, 0, FALSE, 0); 1542 return fperfdata ("time_transfer", elapsed_time_transfer, "s", FALSE, 0, FALSE, 0, FALSE, 0, TRUE, socket_timeout);
1482} 1543}
1483 1544
1484char *perfd_size (int page_len) 1545char *perfd_size (int page_len)
@@ -1506,6 +1567,10 @@ print_help (void)
1506 1567
1507 print_usage (); 1568 print_usage ();
1508 1569
1570#ifdef HAVE_SSL
1571 printf (_("In the first form, make an HTTP request."));
1572 printf (_("In the second form, connect to the server and check the TLS certificate."));
1573#endif
1509 printf (_("NOTE: One or both of -H and -I must be specified")); 1574 printf (_("NOTE: One or both of -H and -I must be specified"));
1510 1575
1511 printf ("\n"); 1576 printf ("\n");
@@ -1555,7 +1620,7 @@ print_help (void)
1555 printf (" %s\n", _("URL to GET or POST (default: /)")); 1620 printf (" %s\n", _("URL to GET or POST (default: /)"));
1556 printf (" %s\n", "-P, --post=STRING"); 1621 printf (" %s\n", "-P, --post=STRING");
1557 printf (" %s\n", _("URL encoded http POST data")); 1622 printf (" %s\n", _("URL encoded http POST data"));
1558 printf (" %s\n", "-j, --method=STRING (for example: HEAD, OPTIONS, TRACE, PUT, DELETE, CONNECT)"); 1623 printf (" %s\n", "-j, --method=STRING (for example: HEAD, OPTIONS, TRACE, PUT, DELETE, CONNECT, CONNECT:POST)");
1559 printf (" %s\n", _("Set HTTP method.")); 1624 printf (" %s\n", _("Set HTTP method."));
1560 printf (" %s\n", "-N, --no-body"); 1625 printf (" %s\n", "-N, --no-body");
1561 printf (" %s\n", _("Don't wait for document body: stop reading after headers.")); 1626 printf (" %s\n", _("Don't wait for document body: stop reading after headers."));
@@ -1585,6 +1650,8 @@ print_help (void)
1585 printf (" %s\n", _("Any other tags to be sent in http header. Use multiple times for additional headers")); 1650 printf (" %s\n", _("Any other tags to be sent in http header. Use multiple times for additional headers"));
1586 printf (" %s\n", "-E, --extended-perfdata"); 1651 printf (" %s\n", "-E, --extended-perfdata");
1587 printf (" %s\n", _("Print additional performance data")); 1652 printf (" %s\n", _("Print additional performance data"));
1653 printf (" %s\n", "-B, --show-body");
1654 printf (" %s\n", _("Print body content below status line"));
1588 printf (" %s\n", "-L, --link"); 1655 printf (" %s\n", "-L, --link");
1589 printf (" %s\n", _("Wrap output in HTML link (obsoleted by urlize)")); 1656 printf (" %s\n", _("Wrap output in HTML link (obsoleted by urlize)"));
1590 printf (" %s\n", "-f, --onredirect=<ok|warning|critical|follow|sticky|stickyport>"); 1657 printf (" %s\n", "-f, --onredirect=<ok|warning|critical|follow|sticky|stickyport>");
@@ -1603,7 +1670,7 @@ print_help (void)
1603 printf ("%s\n", _("Notes:")); 1670 printf ("%s\n", _("Notes:"));
1604 printf (" %s\n", _("This plugin will attempt to open an HTTP connection with the host.")); 1671 printf (" %s\n", _("This plugin will attempt to open an HTTP connection with the host."));
1605 printf (" %s\n", _("Successful connects return STATE_OK, refusals and timeouts return STATE_CRITICAL")); 1672 printf (" %s\n", _("Successful connects return STATE_OK, refusals and timeouts return STATE_CRITICAL"));
1606 printf (" %s\n", _("other errors return STATE_UNKNOWN. Successful connects, but incorrect reponse")); 1673 printf (" %s\n", _("other errors return STATE_UNKNOWN. Successful connects, but incorrect response"));
1607 printf (" %s\n", _("messages from the host result in STATE_WARNING return values. If you are")); 1674 printf (" %s\n", _("messages from the host result in STATE_WARNING return values. If you are"));
1608 printf (" %s\n", _("checking a virtual server that uses 'host headers' you must supply the FQDN")); 1675 printf (" %s\n", _("checking a virtual server that uses 'host headers' you must supply the FQDN"));
1609 printf (" %s\n", _("(fully qualified domain name) as the [host_name] argument.")); 1676 printf (" %s\n", _("(fully qualified domain name) as the [host_name] argument."));
@@ -1642,7 +1709,8 @@ print_help (void)
1642 printf (" %s\n", _("all these options are needed: -I <proxy> -p <proxy-port> -u <check-url> -S(sl) -j CONNECT -H <webserver>")); 1709 printf (" %s\n", _("all these options are needed: -I <proxy> -p <proxy-port> -u <check-url> -S(sl) -j CONNECT -H <webserver>"));
1643 printf (" %s\n", _("a STATE_OK will be returned. When the server returns its content but exceeds")); 1710 printf (" %s\n", _("a STATE_OK will be returned. When the server returns its content but exceeds"));
1644 printf (" %s\n", _("the 5-second threshold, a STATE_WARNING will be returned. When an error occurs,")); 1711 printf (" %s\n", _("the 5-second threshold, a STATE_WARNING will be returned. When an error occurs,"));
1645 printf (" %s\n", _("a STATE_CRITICAL will be returned.")); 1712 printf (" %s\n", _("a STATE_CRITICAL will be returned. By adding a colon to the method you can set the method used"));
1713 printf (" %s\n", _("inside the proxied connection: -j CONNECT:POST"));
1646 1714
1647#endif 1715#endif
1648 1716
@@ -1662,6 +1730,8 @@ print_usage (void)
1662 printf (" [-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport>]\n"); 1730 printf (" [-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport>]\n");
1663 printf (" [-e <expect>] [-d string] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n"); 1731 printf (" [-e <expect>] [-d string] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n");
1664 printf (" [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n"); 1732 printf (" [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n");
1665 printf (" [-A string] [-k string] [-S <version>] [--sni] [-C <warn_age>[,<crit_age>]]\n"); 1733 printf (" [-A string] [-k string] [-S <version>] [--sni]\n");
1666 printf (" [-T <content-type>] [-j method]\n"); 1734 printf (" [-T <content-type>] [-j method]\n");
1735 printf (" %s -H <vhost> | -I <IP-address> -C <warn_age>[,<crit_age>]\n",progname);
1736 printf (" [-p <port>] [-t <timeout>] [-4|-6] [--sni]\n");
1667} 1737}