You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Kumaresan S <ku...@mind-graph.com> on 2026/07/17 08:46:45 UTC
[users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
Hello Apache HTTP Server Community,
I would like to politely follow up on my previous email regarding the following mod_lua warning:
AH02483: lua: Lua handler 'handle' in /var/www/nonce.lua did not return a value, assuming apache2.OK
I understand everyone here is volunteering their time, and I appreciate the support provided through this mailing list.
If anyone has any insights on whether this warning is expected behavior or if there is a recommended best practice for LuaMapHandler return values, I would be very grateful for your guidance.
Please let me know if I should provide any additional information, such as my Lua script, Apache configuration, or complete error logs.
Thank you for your time and assistance.
Best regards,
Kumaresan S
Regards,
Kumaresan S
________________________________
From: Kumaresan S <ku...@mind-graph.com>
Sent: Friday, July 17, 2026 10:55 AM
To: users@httpd.apache.org <us...@httpd.apache.org>
Subject: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
Hello Apache HTTP Server Community,
I am seeking clarification regarding a warning generated by mod_lua in Apache HTTP Server.
Environment
-----------
- Apache HTTP Server: 2.4.37
- Operating System: RHEL 8.x
- Lua Version: 5.3
- Module: mod_lua
Background
----------
I have implemented a Lua handler (nonce.lua) using LuaMapHandler to generate a Content Security Policy (CSP) nonce for each request. The handler reads index.html, replaces the nonce placeholder, sets the appropriate CSP response header, and serves the modified HTML.
The application is functioning as expected:
- The webpage loads successfully.
- The CSP nonce is generated correctly.
- The Content-Security-Policy header is set correctly.
- There are no functional issues observed.
However, Apache logs the following warning for every request:
AH02483: lua: Lua handler handle in /var/www/nonce.lua did not return a value, assuming apache2.OK
My Lua handler completes successfully but does not explicitly return a value.
My questions are:
1. Is this warning expected behavior when the Lua handler does not explicitly return a status code?
2. Is it recommended to explicitly return `apache2.OK` (or another Apache status code) at the end of the handler to avoid this warning?
3. Could leaving the handler without an explicit return have any side effects or is it purely an informational warning?
4. Is there a recommended best practice for LuaMapHandler implementations regarding return values?
If needed, I can provide:
- Apache error log
- Apache module information
Thank you for your time and guidance.
Best regards,
Kumaresan S
Re: [users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
Posted by nwe <nw...@gitcoding.net>.
On 7/17/26 5:43 AM, Kumaresan S wrote:
> I have already updated my Lua handler to explicitly return
> `apache2.OK` at the end of the `handle()` function.
>
> For example:
>
> function handle(r)
> ...
> return apache2.OK
> end
>
> However, Apache continues to log the following warning for every request:
>
> AH02483: lua: Lua handler handle in /var/www/nonce.lua did not return
> a value, assuming apache2.OK
If it did not return what you expected I would question whether it
returned from some other point in your script rather than at 'return
apache2.OK'?
disclaimer: I have zero experience with Lua and little experience with
apache2. Most of my scripting experience is with bash and python.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
Posted by Kumaresan S <ku...@mind-graph.com>.
Noted, Thanks for the support
Regards,
Kumaresan S
________________________________
From: Eric Covener <co...@gmail.com>
Sent: Friday, July 17, 2026 5:15:26 pm
To: users@httpd.apache.org <us...@httpd.apache.org>
Subject: Re: [users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
There is no need to followup so frequently, please stop.
On Fri, Jul 17, 2026 at 7:42 AM Kumaresan S <ku...@mind-graph.com> wrote:
>
> Hello Apache HTTP Server Community,
>
> I would like to politely follow up on my previous email regarding the following mod_lua warning:
>
> AH02483: lua: Lua handler 'handle' in /var/www/nonce.lua did not return a value, assuming apache2.OK
>
> I understand everyone here is volunteering their time, and I appreciate the support provided through this mailing list.
>
> If anyone has any insights on whether this warning is expected behavior or if there is a recommended best practice for LuaMapHandler return values, I would be very grateful for your guidance.
>
> Please let me know if I should provide any additional information, such as my Lua script, Apache configuration, or complete error logs.
>
> Thank you for your time and assistance.
>
> Best regards,
> Kumaresan S
>
> ________________________________
> From: Kumaresan S <ku...@mind-graph.com>
> Sent: Friday, July 17, 2026 4:13 PM
> To: users@httpd.apache.org <us...@httpd.apache.org>
> Subject: Re: [users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
>
> Hello Apache HTTP Server Community,
>
> Thank you for your response.
>
> I have already updated my Lua handler to explicitly return `apache2.OK` at the end of the `handle()` function.
>
> For example:
>
> function handle(r)
> ...
> return apache2.OK
> end
>
> However, Apache continues to log the following warning for every request:
>
> AH02483: lua: Lua handler handle in /var/www/nonce.lua did not return a value, assuming apache2.OK
>
> The application behaves as expected, and there are no functional issues with the application or the Lua handler. The CSP nonce is generated correctly, the application loads successfully, and everything works as intended. The only concern is that this warning is logged in the Apache error log for every request.
>
> Could you please advise if there are any other conditions that could cause this warning even when `apache2.OK` is explicitly returned?
>
> Also, is this warning the expected/default behavior of Apache/mod_lua in any scenarios, or does it indicate that the handler's return value is not being recognized?
>
> If this warning is expected and does not indicate any functional issue, please let me know so that we can treat it as an informational warning.
>
> If it would be helpful, I can provide:
> - The relevant Apache configuration (`LuaMapHandler`)
> - Apache version information
> - The complete Apache error log
>
> Thank you for your time and guidance.
>
> Regards,
> Kumaresan S
> ________________________________
> From: Eric Covener <co...@gmail.com>
> Sent: Friday, July 17, 2026 4:04 PM
> To: users@httpd.apache.org <us...@httpd.apache.org>
> Subject: Re: [users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
>
> On Fri, Jul 17, 2026 at 4:47 AM Kumaresan S <ku...@mind-graph.com> wrote:
> > AH02483: lua: Lua handler 'handle' in /var/www/nonce.lua did not return a value, assuming apache2.OK
>
> I think the message speaks for itself. The manual says:
>
> Hook functions are passed the request object as their only argument
> (except for LuaAuthzProvider, which also gets passed the arguments
> from the Require directive). They can return any value, depending on
> the hook, but most commonly they'll return OK, DONE, or DECLINED,
> which you can write in Lua as apache2.OK, apache2.DONE, or
> apache2.DECLINED, or else an HTTP status code.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
Posted by Eric Covener <co...@gmail.com>.
There is no need to followup so frequently, please stop.
On Fri, Jul 17, 2026 at 7:42 AM Kumaresan S <ku...@mind-graph.com> wrote:
>
> Hello Apache HTTP Server Community,
>
> I would like to politely follow up on my previous email regarding the following mod_lua warning:
>
> AH02483: lua: Lua handler 'handle' in /var/www/nonce.lua did not return a value, assuming apache2.OK
>
> I understand everyone here is volunteering their time, and I appreciate the support provided through this mailing list.
>
> If anyone has any insights on whether this warning is expected behavior or if there is a recommended best practice for LuaMapHandler return values, I would be very grateful for your guidance.
>
> Please let me know if I should provide any additional information, such as my Lua script, Apache configuration, or complete error logs.
>
> Thank you for your time and assistance.
>
> Best regards,
> Kumaresan S
>
> ________________________________
> From: Kumaresan S <ku...@mind-graph.com>
> Sent: Friday, July 17, 2026 4:13 PM
> To: users@httpd.apache.org <us...@httpd.apache.org>
> Subject: Re: [users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
>
> Hello Apache HTTP Server Community,
>
> Thank you for your response.
>
> I have already updated my Lua handler to explicitly return `apache2.OK` at the end of the `handle()` function.
>
> For example:
>
> function handle(r)
> ...
> return apache2.OK
> end
>
> However, Apache continues to log the following warning for every request:
>
> AH02483: lua: Lua handler handle in /var/www/nonce.lua did not return a value, assuming apache2.OK
>
> The application behaves as expected, and there are no functional issues with the application or the Lua handler. The CSP nonce is generated correctly, the application loads successfully, and everything works as intended. The only concern is that this warning is logged in the Apache error log for every request.
>
> Could you please advise if there are any other conditions that could cause this warning even when `apache2.OK` is explicitly returned?
>
> Also, is this warning the expected/default behavior of Apache/mod_lua in any scenarios, or does it indicate that the handler's return value is not being recognized?
>
> If this warning is expected and does not indicate any functional issue, please let me know so that we can treat it as an informational warning.
>
> If it would be helpful, I can provide:
> - The relevant Apache configuration (`LuaMapHandler`)
> - Apache version information
> - The complete Apache error log
>
> Thank you for your time and guidance.
>
> Regards,
> Kumaresan S
> ________________________________
> From: Eric Covener <co...@gmail.com>
> Sent: Friday, July 17, 2026 4:04 PM
> To: users@httpd.apache.org <us...@httpd.apache.org>
> Subject: Re: [users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
>
> On Fri, Jul 17, 2026 at 4:47 AM Kumaresan S <ku...@mind-graph.com> wrote:
> > AH02483: lua: Lua handler 'handle' in /var/www/nonce.lua did not return a value, assuming apache2.OK
>
> I think the message speaks for itself. The manual says:
>
> Hook functions are passed the request object as their only argument
> (except for LuaAuthzProvider, which also gets passed the arguments
> from the Require directive). They can return any value, depending on
> the hook, but most commonly they'll return OK, DONE, or DECLINED,
> which you can write in Lua as apache2.OK, apache2.DONE, or
> apache2.DECLINED, or else an HTTP status code.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
Posted by Kumaresan S <ku...@mind-graph.com>.
Hello Apache HTTP Server Community,
I would like to politely follow up on my previous email regarding the following mod_lua warning:
AH02483: lua: Lua handler 'handle' in /var/www/nonce.lua did not return a value, assuming apache2.OK
I understand everyone here is volunteering their time, and I appreciate the support provided through this mailing list.
If anyone has any insights on whether this warning is expected behavior or if there is a recommended best practice for LuaMapHandler return values, I would be very grateful for your guidance.
Please let me know if I should provide any additional information, such as my Lua script, Apache configuration, or complete error logs.
Thank you for your time and assistance.
Best regards,
Kumaresan S
________________________________
From: Kumaresan S <ku...@mind-graph.com>
Sent: Friday, July 17, 2026 4:13 PM
To: users@httpd.apache.org <us...@httpd.apache.org>
Subject: Re: [users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
Hello Apache HTTP Server Community,
Thank you for your response.
I have already updated my Lua handler to explicitly return `apache2.OK` at the end of the `handle()` function.
For example:
function handle(r)
...
return apache2.OK
end
However, Apache continues to log the following warning for every request:
AH02483: lua: Lua handler handle in /var/www/nonce.lua did not return a value, assuming apache2.OK
The application behaves as expected, and there are no functional issues with the application or the Lua handler. The CSP nonce is generated correctly, the application loads successfully, and everything works as intended. The only concern is that this warning is logged in the Apache error log for every request.
Could you please advise if there are any other conditions that could cause this warning even when `apache2.OK` is explicitly returned?
Also, is this warning the expected/default behavior of Apache/mod_lua in any scenarios, or does it indicate that the handler's return value is not being recognized?
If this warning is expected and does not indicate any functional issue, please let me know so that we can treat it as an informational warning.
If it would be helpful, I can provide:
- The relevant Apache configuration (`LuaMapHandler`)
- Apache version information
- The complete Apache error log
Thank you for your time and guidance.
Regards,
Kumaresan S
________________________________
From: Eric Covener <co...@gmail.com>
Sent: Friday, July 17, 2026 4:04 PM
To: users@httpd.apache.org <us...@httpd.apache.org>
Subject: Re: [users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
On Fri, Jul 17, 2026 at 4:47 AM Kumaresan S <ku...@mind-graph.com> wrote:
> AH02483: lua: Lua handler 'handle' in /var/www/nonce.lua did not return a value, assuming apache2.OK
I think the message speaks for itself. The manual says:
Hook functions are passed the request object as their only argument
(except for LuaAuthzProvider, which also gets passed the arguments
from the Require directive). They can return any value, depending on
the hook, but most commonly they'll return OK, DONE, or DECLINED,
which you can write in Lua as apache2.OK, apache2.DONE, or
apache2.DECLINED, or else an HTTP status code.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
Posted by Kumaresan S <ku...@mind-graph.com>.
Hello Apache HTTP Server Community,
Thank you for your response.
I have already updated my Lua handler to explicitly return `apache2.OK` at the end of the `handle()` function.
For example:
function handle(r)
...
return apache2.OK
end
However, Apache continues to log the following warning for every request:
AH02483: lua: Lua handler handle in /var/www/nonce.lua did not return a value, assuming apache2.OK
The application behaves as expected, and there are no functional issues with the application or the Lua handler. The CSP nonce is generated correctly, the application loads successfully, and everything works as intended. The only concern is that this warning is logged in the Apache error log for every request.
Could you please advise if there are any other conditions that could cause this warning even when `apache2.OK` is explicitly returned?
Also, is this warning the expected/default behavior of Apache/mod_lua in any scenarios, or does it indicate that the handler's return value is not being recognized?
If this warning is expected and does not indicate any functional issue, please let me know so that we can treat it as an informational warning.
If it would be helpful, I can provide:
- The relevant Apache configuration (`LuaMapHandler`)
- Apache version information
- The complete Apache error log
Thank you for your time and guidance.
Regards,
Kumaresan S
________________________________
From: Eric Covener <co...@gmail.com>
Sent: Friday, July 17, 2026 4:04 PM
To: users@httpd.apache.org <us...@httpd.apache.org>
Subject: Re: [users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
On Fri, Jul 17, 2026 at 4:47 AM Kumaresan S <ku...@mind-graph.com> wrote:
> AH02483: lua: Lua handler 'handle' in /var/www/nonce.lua did not return a value, assuming apache2.OK
I think the message speaks for itself. The manual says:
Hook functions are passed the request object as their only argument
(except for LuaAuthzProvider, which also gets passed the arguments
from the Require directive). They can return any value, depending on
the hook, but most commonly they'll return OK, DONE, or DECLINED,
which you can write in Lua as apache2.OK, apache2.DONE, or
apache2.DECLINED, or else an HTTP status code.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)
Posted by Eric Covener <co...@gmail.com>.
On Fri, Jul 17, 2026 at 4:47 AM Kumaresan S <ku...@mind-graph.com> wrote:
> AH02483: lua: Lua handler 'handle' in /var/www/nonce.lua did not return a value, assuming apache2.OK
I think the message speaks for itself. The manual says:
Hook functions are passed the request object as their only argument
(except for LuaAuthzProvider, which also gets passed the arguments
from the Require directive). They can return any value, depending on
the hook, but most commonly they'll return OK, DONE, or DECLINED,
which you can write in Lua as apache2.OK, apache2.DONE, or
apache2.DECLINED, or else an HTTP status code.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org