aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/stat_process.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-30 15:36:45 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-30 15:36:45 +0100
commit6c442ab866b1f0b964afd7fb25553baf09ef375b (patch)
tree0aadbfc241d3a9995a47f7f7d99dee0f6ae6a1d9 /src/libstat/stat_process.c
parent4f82c9c58d320dd5f590f4712a4b85ee6d2c77fb (diff)
downloadrspamd-6c442ab866b1f0b964afd7fb25553baf09ef375b.tar.gz
rspamd-6c442ab866b1f0b964afd7fb25553baf09ef375b.zip
Revert "[Minor] Improve headers tokens in bayes"
This reverts commit b6a20c74a44332f04a17a6e430a60f1b51d20f0f.
Diffstat (limited to 'src/libstat/stat_process.c')
-rw-r--r--src/libstat/stat_process.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c
index 070b9d6ca..4f7f4e703 100644
--- a/src/libstat/stat_process.c
+++ b/src/libstat/stat_process.c
@@ -190,13 +190,8 @@ rspamd_stat_tokenize_parts_metadata (struct rspamd_stat_ctx *st_ctx,
hdr = cur->data;
if (hdr->name && hdr->type != RSPAMD_HEADER_RECEIVED) {
- /* We assume that headers count is not more than 10^10 */
- gsize nlen = strlen (hdr->name) + 1 + 10;
- gchar *hdrbuf = rspamd_mempool_alloc (task->task_pool, nlen);
- nlen = rspamd_snprintf (hdrbuf, nlen, "%s:%d", hdr->name, hdr->order);
- rspamd_str_lc (hdrbuf, nlen);
- elt.begin = hdrbuf;
- elt.len = nlen;
+ elt.begin = hdr->name;
+ elt.len = strlen (hdr->name);
g_array_append_val (ar, elt);
}