aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_mimepart.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/lua_mimepart.c')
-rw-r--r--src/lua/lua_mimepart.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lua/lua_mimepart.c b/src/lua/lua_mimepart.c
index d519cccbe..a2b6cc49c 100644
--- a/src/lua/lua_mimepart.c
+++ b/src/lua/lua_mimepart.c
@@ -668,19 +668,22 @@ lua_mimepart_get_filename (lua_State * L)
static gint
lua_mimepart_get_header_common (lua_State *L, gboolean full, gboolean raw)
{
- gboolean strong = FALSE;
struct rspamd_mime_part *part = lua_check_mimepart (L);
const gchar *name;
+ GPtrArray *ar;
name = luaL_checkstring (L, 2);
if (name && part) {
- if (lua_gettop (L) == 3) {
- strong = lua_toboolean (L, 3);
- }
- return rspamd_lua_push_header (L, part->raw_headers, name, strong, full, raw);
+
+ ar = rspamd_message_get_header_from_hash (part->raw_headers, NULL,
+ name, FALSE);
+
+ return rspamd_lua_push_header (L, ar, name, FALSE, full, raw);
}
+
lua_pushnil (L);
+
return 1;
}