Re: AH02483: lua: Lua handler 'handle' did not return a value, assuming apache2.OK (mod_lua)

Kumaresan S <[email protected]> Fri, 17 Jul 2026 08:46:45 +0000
Newsgroups gmane.comp.apache.user
Message-ID <KL1PR03MB77415291509A981F7A3BA96EDEC62@KL1PR03MB7741.apcprd03.prod.outlook.com>
--_000_KL1PR03MB77415291509A981F7A3BA96EDEC62KL1PR03MB7741apcp_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hello Apache HTTP Server Community,

I would like to politely follow up on my previous email regarding the follo=
wing mod_lua warning:

AH02483: lua: Lua handler 'handle' in /var/www/nonce.lua did not return a v=
alue, 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, assumin=
g apache2.OK (mod_lua)

Hello Apache HTTP Server Community,

I am seeking clarification regarding a warning generated by mod_lua in Apac=
he 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 generat=
e a Content Security Policy (CSP) nonce for each request. The handler reads=
 index.html, replaces the nonce placeholder, sets the appropriate CSP respo=
nse 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 val=
ue, assuming apache2.OK

My Lua handler completes successfully but does not explicitly return a valu=
e.

My questions are:

1. Is this warning expected behavior when the Lua handler does not explicit=
ly return a status code?
2. Is it recommended to explicitly return `apache2.OK` (or another Apache s=
tatus code) at the end of the handler to avoid this warning?
3. Could leaving the handler without an explicit return have any side effec=
ts or is it purely an informational warning?
4. Is there a recommended best practice for LuaMapHandler implementations r=
egarding return values?

If needed, I can provide:
- Apache error log
- Apache module information

Thank you for your time and guidance.

Best regards,
Kumaresan S


--_000_KL1PR03MB77415291509A981F7A3BA96EDEC62KL1PR03MB7741apcp_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello Apache HTTP Server Community,</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I would like to politely follow up on my previous email regarding the follo=
wing mod_lua warning:</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
AH02483: lua: Lua handler 'handle' in /var/www/nonce.lua did not return a v=
alue, assuming apache2.OK</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I understand everyone here is volunteering their time, and I appreciate the=
 support provided through this mailing list.</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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.</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Please let me know if I should provide any additional information, such as =
my Lua script, Apache configuration, or complete error logs.</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you for your time and assistance.</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best regards,</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
 color: rgb(0, 0, 0);">
Kumaresan S</div>
<div id=3D"Signature" class=3D"elementToProof">
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class=3D"elementToProof" style=3D"font-family: Calibri, Helvetica, san=
s-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards,<br>
Kumaresan S<br>
</div>
</div>
<div id=3D"appendonsend"></div>
<hr style=3D"display:inline-block;width:98%" tabindex=3D"-1">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st=
yle=3D"font-size:11pt" color=3D"#000000"><b>From:</b> Kumaresan S &lt;kumar=
[email protected]&gt;<br>
<b>Sent:</b> Friday, July 17, 2026 10:55 AM<br>
<b>To:</b> [email protected] &lt;[email protected]&gt;<br>
<b>Subject:</b> AH02483: lua: Lua handler 'handle' did not return a value, =
assuming apache2.OK (mod_lua)</font>
<div>&nbsp;</div>
</div>
<style type=3D"text/css" style=3D"display:none">
<!--
p
	{margin-top:0;
	margin-bottom:0}
-->
</style>
<div dir=3D"ltr">
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
Hello Apache HTTP Server Community,</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
I am seeking clarification regarding a warning generated by mod_lua in Apac=
he HTTP Server.</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
Environment</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
-----------</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
- Apache HTTP Server: 2.4.37</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
- Operating System: RHEL 8.x</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
- Lua Version: 5.3</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
- Module: mod_lua</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
Background</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
----------</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
I have implemented a Lua handler (nonce.lua) using LuaMapHandler to generat=
e a Content Security Policy (CSP) nonce for each request. The handler reads=
 index.html, replaces the nonce placeholder, sets the appropriate CSP respo=
nse header, and serves the modified
 HTML.</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
The application is functioning as expected:</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
- The webpage loads successfully.</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
- The CSP nonce is generated correctly.</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
- The Content-Security-Policy header is set correctly.</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
- There are no functional issues observed.</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
However, Apache logs the following warning for every request:</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
AH02483: lua: Lua handler handle in /var/www/nonce.lua did not return a val=
ue, assuming apache2.OK</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
My Lua handler completes successfully but does not explicitly return a valu=
e.</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
My questions are:</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
1. Is this warning expected behavior when the Lua handler does not explicit=
ly return a status code?</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
2. Is it recommended to explicitly return `apache2.OK` (or another Apache s=
tatus code) at the end of the handler to avoid this warning?</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
3. Could leaving the handler without an explicit return have any side effec=
ts or is it purely an informational warning?</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
4. Is there a recommended best practice for LuaMapHandler implementations r=
egarding return values?</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
If needed, I can provide:</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
- Apache error log</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
- Apache module information</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
Thank you for your time and guidance.</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
Best regards,</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
Kumaresan S</div>
<div class=3D"x_elementToProof">
<div class=3D"x_elementToProof" style=3D"font-family:Calibri,Helvetica,sans=
-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
</div>
</div>
</body>
</html>

--_000_KL1PR03MB77415291509A981F7A3BA96EDEC62KL1PR03MB7741apcp_--