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 <[email protected]> Sent: Friday, July 17, 2026 10:55 AM To: [email protected] <[email protected]> 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
