]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Lua_task: Store raw header when getting full header data
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 17 Dec 2018 12:32:39 +0000 (12:32 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 17 Dec 2018 12:32:39 +0000 (12:32 +0000)
src/lua/lua_task.c

index 737f86802d6bfc90a2fe0332b3ad6d619fbe40a6..e9ac358d83132a74b86e332f479d5ae0f8d4c121 100644 (file)
@@ -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);
                }