Mailing List Archive

Question about source code comment
Hello. While investigating source codes I've found the following
comment for modules/lua/lua_request.c::lua_ap_get_active_config
function - "Hack, hack, hack...! TODO: Make this actually work
properly". Could anyone explain what needs to be fixed for this
function? I'm looking for a contributor's mission as suggested by the
STATUS file. Thanks in advance!
Re: Question about source code comment [ In reply to ]
Hi Nikita,

that was done by Daniel Gruno aka Humbedooh. Maybe he still knows why
I added that comment in 2014.


Cheers
Mario

On Tue, 8 Jun 2021 at 08:43, Nikita Popov <npopov@cloudlinux.com> wrote:
>
> Hello. While investigating source codes I've found the following
> comment for modules/lua/lua_request.c::lua_ap_get_active_config
> function - "Hack, hack, hack...! TODO: Make this actually work
> properly". Could anyone explain what needs to be fixed for this
> function? I'm looking for a contributor's mission as suggested by the
> STATUS file. Thanks in advance!
Re: Question about source code comment [ In reply to ]
Just eyeballing it, but probably because it is doing fairly fragile string
matches into config to look for virtualhost configs to apply to the
request. Likely done as the lua_state may be reused across virtualhosts, so
different config from where it was created.

-Brian

On Tue, Jun 8, 2021 at 1:43 AM Nikita Popov <npopov@cloudlinux.com> wrote:

> Hello. While investigating source codes I've found the following
> comment for modules/lua/lua_request.c::lua_ap_get_active_config
> function - "Hack, hack, hack...! TODO: Make this actually work
> properly". Could anyone explain what needs to be fixed for this
> function? I'm looking for a contributor's mission as suggested by the
> STATUS file. Thanks in advance!
>