aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);