From: Brian McCallister Date: Wed, 4 Nov 2009 23:28:22 +0000 (+0000) Subject: allow setting of r->user from lua X-Git-Tag: 2.3.3~48 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ae86f20e49392d651433b00da25e9f3de2a1483;p=apache 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 --- 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",