aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_task.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 2354cb546..7072ebe35 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -2860,7 +2860,13 @@ lua_task_get_received_headers (lua_State * L)
const gchar *proto;
guint k = 1;
- if (task && task->message) {
+ if (task) {
+ if (!task->message) {
+ /* No message - no received */
+ lua_newtable (L);
+ return 1;
+ }
+
if (!lua_task_get_cached (L, task, "received")) {
lua_createtable (L, 0, 0);