diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-01-11 13:38:26 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-01-11 13:38:26 +0000 |
commit | d9e35ca50f4cf853fb2a2a4505cccbd1a761cfce (patch) | |
tree | db857fa6aaa68d64f01b59cca4132ff9ebd49374 | |
parent | 2ff5ecbe9b17c055ac3e97dee2c1085b3903addd (diff) | |
download | rspamd-d9e35ca50f4cf853fb2a2a4505cccbd1a761cfce.tar.gz rspamd-d9e35ca50f4cf853fb2a2a4505cccbd1a761cfce.zip |
[Minor] Add trailing slash when reconstructing numeric url
-rw-r--r-- | src/libserver/url.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libserver/url.c b/src/libserver/url.c index bb32063d7..cb9c214d2 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -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", |