aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_http.c
diff options
context:
space:
mode:
authorGravatar Ton Voon <tonvoon@users.sourceforge.net> 2003-12-11 10:00:07 +0000
committerGravatar Ton Voon <tonvoon@users.sourceforge.net> 2003-12-11 10:00:07 +0000
commitc9575e15e4cd5e385a8040052d48f140804c10c6 (patch)
tree0f559f95863a4a508afe98463ca9e35f641e0976 /plugins/check_http.c
parent70825c575c6c72b4a576ffccc0f3f28a5fe402a3 (diff)
downloadmonitoring-plugins-c9575e15e4cd5e385a8040052d48f140804c10c6.tar.gz
Relative redirects not followed correctly (854131 - John Sivak)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@788 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r--plugins/check_http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 4dcf1a5a..8e45e88d 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -838,9 +838,9 @@ redir (char *pos, char *status_line)
else if (sscanf (pos, HD5, url) == 1) {
/* relative url */
if ((url[0] != '/')) {
- if ((x = strrchr(url, '/')))
+ if ((x = strrchr(server_url, '/')))
*x = '\0';
- asprintf (&server_url, "%s/%s", server_url, url);
+ asprintf (&url, "%s/%s", server_url, url);
}
i = server_port;
strcpy (type, server_type);