You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2014/11/14 05:09:13 UTC

[Bug 57211] New: Config-time options

https://issues.apache.org/bugzilla/show_bug.cgi?id=57211

            Bug ID: 57211
           Summary: Config-time options
           Product: Apache httpd-2
           Version: 2.4.10
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: mod_lua
          Assignee: bugs@httpd.apache.org
          Reporter: gregory_lundberg@gmx.com

Code re-use would be enhanced if each mod_lua hander allowed config-time
options.

At present LuaAuthzProvider accepts config-line options.

LuaQuickHandler, LuaHookTranslateName, LuaHookMapToStorage,
LuaHookAccessChecker, LuaHookCheckUserID, LuaHookAuthChecker,
LuaHookTypeChecker, LuaHookFixups, and LuaHookLog would benefit from similar
features.

I'm on the fence as to whether LuaMapHandler would benefit, but can see the
case to do so since it can avoid namespace pollution encoding options in the
function name.

Several options allow 'early' and 'late' as an optional parameter. My thinking
would be the add parsing of additional parameters following these, if present.

LuaAuthzProvider calls a function, assigning option strings to each parameter.
When you want a variable number, say, from 1 to 3 optional words on the config
line, you need to add a fourth parameter then test r-TO-l for nil to verify
only 1, 2, or 3 parameters appeared.

My suggestion would be to store all command-line parameters in a single
function parameter, as an array. Testing the number present then becomes simply
checking the array length.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 57211] Config-time options

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57211

--- Comment #1 from Gregory A Lundberg <gr...@gmx.com> ---
Thinking more on 'early' and 'late' it might also help to add 'normal' as an
optional documentation of not-early and not-late, and then pass this parameter
as the first element of the array I'm suggesting.  This would allow Lua code to
handle all three timing conditions, reacting as appropriate to each.

I find myself doing TranslateEarly, Translate, and TranslateLate functions and
simply injecting 'early', 'normal', 'late' into a call to a common local
function handling all three cases.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org