diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-08-23 16:31:22 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-08-23 16:31:52 +0100 |
commit | 50753081cc9a6fc30d3be8ad7979c8d1000132fd (patch) | |
tree | 3498ac0e3dddd98dc5b7c624eec41f8abefb72c2 /src | |
parent | 233c911bdf5ee87abbe9955eb1b9dc20aab93c7b (diff) | |
download | rspamd-50753081cc9a6fc30d3be8ad7979c8d1000132fd.tar.gz rspamd-50753081cc9a6fc30d3be8ad7979c8d1000132fd.zip |
[Minor] Implement better support of indexes in adding of headers
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/milter.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libserver/milter.c b/src/libserver/milter.c index 05525fe5d..fac46da1a 100644 --- a/src/libserver/milter.c +++ b/src/libserver/milter.c @@ -1638,6 +1638,19 @@ rspamd_milter_process_milter_block (struct rspamd_milter_session *session, } else { /* Calculate negative offset */ + + if (-idx <= priv->cur_hdr) { + rspamd_milter_send_action (session, + RSPAMD_MILTER_INSHEADER, + priv->cur_hdr + idx + 1, + hname, hvalue); + } + else { + rspamd_milter_send_action (session, + RSPAMD_MILTER_INSHEADER, + 0, + hname, hvalue); + } } } else { |