summaryrefslogtreecommitdiffstats
path: root/web/attachments/69716-check_http.c.diff
blob: 503f10c8c0bd291191d8b6e0e9a5274751a2c121 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Index: check_http.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_http.c,v
retrieving revision 1.54
diff -u -r1.54 check_http.c
--- check_http.c        15 Sep 2003 05:03:47 -0000      1.54
+++ check_http.c        4 Dec 2003 16:00:24 -0000
@@ -837,11 +837,13 @@
                /* URI_PATH */
                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);
                        strcpy (addr, host_name);