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 <[email protected]>
Sent: Friday, July 17, 2026 4:04 PM
To: [email protected] <[email protected]>
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 <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]