httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject svn commit: r832905 - /httpd/httpd/trunk/modules/lua/lua_request.c
Date Wed, 04 Nov 2009 23:28:22 GMT
Author: brianm
Date: Wed Nov  4 23:28:22 2009
New Revision: 832905

URL: http://svn.apache.org/viewvc?rev=832905&view=rev
Log:
allow setting of r->user from lua

Modified:
    httpd/httpd/trunk/modules/lua/lua_request.c

Modified: httpd/httpd/trunk/modules/lua/lua_request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_request.c?rev=832905&r1=832904&r2=832905&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_request.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_request.c Wed Nov  4 23:28:22 2009
@@ -478,6 +478,12 @@
         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",



Mime
View raw message