Skip to content

Commit

Permalink
[Minor] Allow to get raw body of non processed messages
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Dec 14, 2020
1 parent 865a3fa commit 5ce6a2d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lua/lua_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -2546,7 +2546,13 @@ lua_task_get_rawbody (lua_State * L)
t->flags = 0;
}
else {
lua_pushnil (L);
/* Push body it it is there */
if (task->msg.len > 0 && task->msg.begin != NULL) {
lua_new_text (L, task->msg.begin, task->msg.len, FALSE);
}
else {
lua_pushnil (L);
}
}
}
else {
Expand Down

0 comments on commit 5ce6a2d

Please sign in to comment.