summaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-14 12:38:32 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-14 12:38:32 +0100
commit58eb1a0b68572f86be8c861d1f38db9ef34b712b (patch)
treea19b555b51827cb87b4a2955aa4afbd0b08ca2dc /src/lua
parent7a356c782ee05cf9b942e92e381f453d205a9cc1 (diff)
downloadrspamd-58eb1a0b68572f86be8c861d1f38db9ef34b712b.tar.gz
rspamd-58eb1a0b68572f86be8c861d1f38db9ef34b712b.zip
[Rework] Rework request headers processing
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_task.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 0b2dd4ab3..6182d64fb 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -1476,6 +1476,7 @@ lua_task_set_message (lua_State * L)
lua_pop (L, 1);
}
+ task->flags |= RSPAMD_TASK_FLAG_MESSAGE_REWRITE;
task->msg.begin = buf;
task->msg.len = final_len;
}
@@ -1502,6 +1503,7 @@ lua_task_set_message (lua_State * L)
if (buf) {
task->msg.begin = buf;
task->msg.len = final_len;
+ task->flags |= RSPAMD_TASK_FLAG_MESSAGE_REWRITE;
}
}
@@ -4778,6 +4780,8 @@ lua_task_has_flag (lua_State *L)
RSPAMD_TASK_FLAG_BAD_UNICODE);
LUA_TASK_GET_FLAG (flag, "mime",
RSPAMD_TASK_FLAG_MIME);
+ LUA_TASK_GET_FLAG (flag, "message_rewrite",
+ RSPAMD_TASK_FLAG_MESSAGE_REWRITE);
if (!found) {
msg_warn_task ("unknown flag requested: %s", flag);
@@ -4853,6 +4857,10 @@ lua_task_get_flags (lua_State *L)
lua_pushstring (L, "milter");
lua_rawseti (L, -2, idx++);
break;
+ case RSPAMD_TASK_FLAG_MESSAGE_REWRITE:
+ lua_pushstring (L, "message_rewrite");
+ lua_rawseti (L, -2, idx++);
+ break;
default:
break;
}