mirror of
https://github.com/civetweb/civetweb
synced 2025-03-28 21:13:27 +00:00
Lua error handler for all errors
This commit is contained in:
parent
93065f0278
commit
b5da6dbcaa
12
test/error.lua
Normal file
12
test/error.lua
Normal file
@ -0,0 +1,12 @@
|
||||
mg.write("HTTP/1.0 200 OK\r\n")
|
||||
mg.write("Content-Type: text/html\r\n")
|
||||
mg.write("\r\n")
|
||||
mg.write([[<html><body>
|
||||
<p>Lua error handler:</p>
|
||||
<p>Status code: ]])
|
||||
|
||||
mg.write(tostring(mg.request_info.status))
|
||||
|
||||
mg.write([[</p>
|
||||
</body></html>
|
||||
]])
|
Loading…
x
Reference in New Issue
Block a user