]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Add trailing slash when reconstructing numeric url
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 11 Jan 2020 13:38:26 +0000 (13:38 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 11 Jan 2020 13:38:26 +0000 (13:38 +0000)
src/libserver/url.c

index bb32063d7a73602dda4a20b8924cdd928fa0eb0b..cb9c214d28d8708302372fb75390f7a93518f54c 100644 (file)
@@ -1602,6 +1602,11 @@ rspamd_url_regen_from_inet_addr (struct rspamd_url *uri, const void *addr, int a
                                uri->data);
                uri->data = p;
        }
+       else {
+               /* Add trailing slash if needed */
+               r += rspamd_snprintf (strbuf + r, slen - r, "/");
+       }
+
        if (uri->querylen > 0) {
                p = strbuf + r + 1;
                r += rspamd_snprintf (strbuf + r, slen - r, "?%*s",