aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_http.c
diff options
context:
space:
mode:
authorGravatar Matthew Kent <mattkent@users.sourceforge.net> 2004-11-20 21:36:52 +0000
committerGravatar Matthew Kent <mattkent@users.sourceforge.net> 2004-11-20 21:36:52 +0000
commit1c79c43c88408f6e98a03e344ffe00f05decdae9 (patch)
tree1a7b9b4364a8794f29b3f12a95d52c1a5d6a760c /plugins/check_http.c
parenta8af4ed87437b2565eb2d098d7b6c30b5a74dd87 (diff)
downloadmonitoring-plugins-1c79c43c88408f6e98a03e344ffe00f05decdae9.tar.gz
Bit of cleanup, fix verbose output.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@915 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r--plugins/check_http.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 5ec212a2..c48e97cd 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -154,8 +154,8 @@ main (int argc, char **argv)
}
if (display_html == TRUE)
- printf ("<A HREF=\"%s%s:%d%s\" target=\"_blank\">",
- use_ssl ? "https://" : "http://", host_name,
+ printf ("<A HREF=\"%s://%s:%d%s\" target=\"_blank\">",
+ use_ssl ? "https" : "http", host_name,
server_port, server_url);
/* initialize alarm signal handling, set socket timeout, start timer */
@@ -505,8 +505,7 @@ base64 (const char *bin, size_t len)
static int
document_headers_done (char *full_page)
{
- const char *body, *s;
- const char *end;
+ const char *body;
for (body = full_page; *body; body++) {
if (!strncmp (body, "\n\n", 2) || !strncmp (body, "\n\r\n", 3))
@@ -842,7 +841,9 @@ check_http (void)
page = full_page;
if (verbose)
- printf ("%s://%s:%d%s is %d characters\n", server_type, server_address, server_port, server_url, pagesize);
+ printf ("%s://%s:%d%s is %d characters\n",
+ use_ssl ? "https" : "http", server_address,
+ server_port, server_url, pagesize);
/* find status line and null-terminate it */
status_line = page;