commit d6003a3: [Minor] Lua_task: Store raw header when getting full header data

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Dec 27 18:28:09 UTC 2018


Author: Vsevolod Stakhov
Date: 2018-12-17 12:32:39 +0000
URL: https://github.com/rspamd/rspamd/commit/d6003a3997a914b9441a57281061dbaa3de26f08

[Minor] Lua_task: Store raw header when getting full header data

---
 src/lua/lua_task.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 737f86802..e9ac358d8 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -2108,6 +2108,12 @@ rspamd_lua_push_header (lua_State *L, struct rspamd_mime_header *rh,
 			rspamd_lua_table_set (L, "value", rh->value);
 		}
 
+		if (rh->raw_len > 0) {
+			lua_pushstring (L, "raw");
+			lua_pushlstring (L, rh->raw_value, rh->raw_len);
+			lua_settable (L, -3);
+		}
+
 		if (rh->decoded) {
 			rspamd_lua_table_set (L, "decoded", rh->decoded);
 		}


More information about the Commits mailing list