diff --git a/plugins/check_http.c b/plugins/check_http.c
index b371cd6413267e6ccc556386869afe67390e8934..24819359cb4c14519046e08cccb18f5f4ab0edee 100644 (file)
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
if (display_html == TRUE)
printf ("<A HREF=\"%s://%s:%d%s\" target=\"_blank\">",
- use_ssl ? "https" : "http", server_address,
+ use_ssl ? "https" : "http", host_name ? host_name : server_address,
server_port, server_url);
/* initialize alarm signal handling, set socket timeout, start timer */
}
i = server_port;
strcpy (type, server_type);
- strcpy (addr, server_address);
+ strcpy (addr, host_name ? host_name : server_address);
}
else {
display_html ? "</A>" : "");
if (verbose)
- printf (_("Redirection to %s://%s:%d%s\n"), server_type, server_address,
- server_port, server_url);
+ printf (_("Redirection to %s://%s:%d%s\n"), server_type,
+ host_name ? host_name : server_address, server_port, server_url);
check_http ();
}