summaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_http.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c
index ab389cb82..31b0b3be3 100644
--- a/src/lua/lua_http.c
+++ b/src/lua/lua_http.c
@@ -578,6 +578,15 @@ lua_http_request (lua_State *L)
}
lua_pop (L, 1);
+
+ lua_pushstring (L, "method");
+ lua_gettable (L, 1);
+
+ if (lua_type (L, -1) == LUA_TSTRING) {
+ rspamd_http_message_set_method (msg, lua_tostring (L, -1));
+ }
+
+ lua_pop (L, 1);
}
else {
msg_err ("http request has bad params");