aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/url.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-08-12 18:04:13 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-08-12 20:26:17 +0100
commit809d57ec6a1152b040a24c2ede1d22c5effc0dcb (patch)
treeb498358e699fa270fd4277ba460459f6f1fdf2bf /src/libserver/url.c
parent9f825e53d329e67a15f77d09b546e8f840e81fa8 (diff)
downloadrspamd-809d57ec6a1152b040a24c2ede1d22c5effc0dcb.tar.gz
rspamd-809d57ec6a1152b040a24c2ede1d22c5effc0dcb.zip
[Minor] Store raw urls
Diffstat (limited to 'src/libserver/url.c')
-rw-r--r--src/libserver/url.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libserver/url.c b/src/libserver/url.c
index c7df932b8..cc7c7acbf 100644
--- a/src/libserver/url.c
+++ b/src/libserver/url.c
@@ -1592,7 +1592,10 @@ rspamd_url_parse (struct rspamd_url *uri, gchar *uristring, gsize len,
uri->flags |= RSPAMD_URL_FLAG_OBSCURED;
}
- uri->string = p;
+ uri->raw = p;
+ uri->rawlen = len;
+ uri->string = rspamd_mempool_alloc (pool, len + 1);
+ rspamd_strlcpy (uri->string, p, len + 1);
uri->urllen = len;
/* Now decode url symbols */