diff options
author | Holger Weiss <hweiss@users.sourceforge.net> | 2008-01-06 19:45:00 (GMT) |
---|---|---|
committer | Holger Weiss <hweiss@users.sourceforge.net> | 2008-01-06 19:45:00 (GMT) |
commit | 6157a19b1b955e44599d578be157085c137ffc5a (patch) | |
tree | 1e31b208c641668b95b3b7badedfbe26abcea815 | |
parent | 78def17d7cefd89867e27b5e684651a5998cc33a (diff) | |
download | monitoring-plugins-6157a19b1b955e44599d578be157085c137ffc5a.tar.gz |
Remove support for specifying the port number using "-H example.com:80".
Since this didn't work anyway (because ":80" wasn't stripped from the
"host_name" after extracting the "server_port"), nobody can be using
this syntax, and it prevents "-H" from accepting IPv6 addresses
(neufeind - 1865082). IMO, fixing it to recognize both ":80" and IPv6
addresses isn't worth it, as the ":80" syntax doesn't seem very useful
for Nagios plugins (given the way how they are usually called in Nagios
command definitions).
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1891 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r-- | plugins/check_http.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c index bec02e1..9fb7aea 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c | |||
@@ -317,8 +317,6 @@ process_arguments (int argc, char **argv) | |||
317 | /* Note: H, I, and u must be malloc'd or will fail on redirects */ | 317 | /* Note: H, I, and u must be malloc'd or will fail on redirects */ |
318 | case 'H': /* Host Name (virtual host) */ | 318 | case 'H': /* Host Name (virtual host) */ |
319 | host_name = strdup (optarg); | 319 | host_name = strdup (optarg); |
320 | if (strstr (optarg, ":")) | ||
321 | sscanf (optarg, "%*[^:]:%d", &server_port); | ||
322 | break; | 320 | break; |
323 | case 'I': /* Server IP-address */ | 321 | case 'I': /* Server IP-address */ |
324 | server_address = strdup (optarg); | 322 | server_address = strdup (optarg); |