diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-08-12 18:04:13 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-08-12 20:26:17 +0100 |
commit | 809d57ec6a1152b040a24c2ede1d22c5effc0dcb (patch) | |
tree | b498358e699fa270fd4277ba460459f6f1fdf2bf /src/libserver/url.c | |
parent | 9f825e53d329e67a15f77d09b546e8f840e81fa8 (diff) | |
download | rspamd-809d57ec6a1152b040a24c2ede1d22c5effc0dcb.tar.gz rspamd-809d57ec6a1152b040a24c2ede1d22c5effc0dcb.zip |
[Minor] Store raw urls
Diffstat (limited to 'src/libserver/url.c')
-rw-r--r-- | src/libserver/url.c | 5 |
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 */ |