diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-23 19:42:20 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-23 19:42:20 +0400 |
commit | 4a8c30c78940a9153de23dc4d031273649e93cce (patch) | |
tree | f6e7b6ed2eb70a38416393e1da5680f886813554 /src | |
parent | 3af0406df42e6df644bf74a81fb7dd380d71901a (diff) | |
download | rspamd-4a8c30c78940a9153de23dc4d031273649e93cce.tar.gz rspamd-4a8c30c78940a9153de23dc4d031273649e93cce.zip |
* Save in regexp cache the whole regexp with header name (if exists) and with flags
This issue can be a reason why similar regexp are NOT working for different headers
Diffstat (limited to 'src')
-rw-r--r-- | src/expressions.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/expressions.c b/src/expressions.c index f28f38efb..447bdcbc2 100644 --- a/src/expressions.c +++ b/src/expressions.c @@ -704,7 +704,8 @@ parse_regexp (memory_pool_t * pool, char *line, gboolean raw_mode) } } result->regexp = g_regex_new (begin, regexp_flags, 0, &err); - result->regexp_text = memory_pool_strdup (pool, begin); + *end = '/'; + result->regexp_text = memory_pool_strdup (pool, line); memory_pool_add_destructor (pool, (pool_destruct_func) g_regex_unref, (void *)result->regexp); if (result->regexp == NULL || err != NULL) { |