From 4ae86f20e49392d651433b00da25e9f3de2a1483 Mon Sep 17 00:00:00 2001 From: Brian McCallister Date: Wed, 4 Nov 2009 23:28:22 +0000 Subject: [PATCH] allow setting of r->user from lua git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832905 13f79535-47bb-0310-9956-ffa450edef68 --- modules/lua/lua_request.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index 6f01da5e78..f589ad7480 100644 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -478,6 +478,12 @@ static int req_newindex(lua_State *L) return 0; } + if (0 == apr_strnatcmp("user", key)) { + const char *value = luaL_checkstring(L, 3); + r->user = apr_pstrdup(r->pool, value); + return 0; + } + lua_pushstring(L, apr_psprintf(r->pool, "Property [%s] may not be set on a request_rec", -- 2.40.0