summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2003-12-11 10:00:07 +0000
committerTon Voon <tonvoon@users.sourceforge.net>2003-12-11 10:00:07 +0000
commitc9575e15e4cd5e385a8040052d48f140804c10c6 (patch)
tree0f559f95863a4a508afe98463ca9e35f641e0976
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
-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)
838 else if (sscanf (pos, HD5, url) == 1) { 838 else if (sscanf (pos, HD5, url) == 1) {
839 /* relative url */ 839 /* relative url */
840 if ((url[0] != '/')) { 840 if ((url[0] != '/')) {
841 if ((x = strrchr(url, '/'))) 841 if ((x = strrchr(server_url, '/')))
842 *x = '\0'; 842 *x = '\0';
843 asprintf (&server_url, "%s/%s", server_url, url); 843 asprintf (&url, "%s/%s", server_url, url);
844 } 844 }
845 i = server_port; 845 i = server_port;
846 strcpy (type, server_type); 846 strcpy (type, server_type);