the upcoming 2.0 version
https://redmine.lighttpd.net/projects/lighttpd2
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
382 B
18 lines
382 B
local function try_cached_html(vr) |
|
local p = vr.phys.path |
|
if p:sub(-1) == '/' then |
|
p = p:sub(0, -2) .. '.html' |
|
else |
|
p = p .. '.html' |
|
end |
|
st, res = vr:stat(p) |
|
if st and st.is_file then |
|
-- found the file |
|
vr.phys.path = p |
|
elseif res == lighty.HANDLER_WAIT_FOR_EVENT then |
|
return lighty.HANDLER_WAIT_FOR_EVENT |
|
end |
|
-- ignore other errors |
|
end |
|
|
|
actions = try_cached_html
|
|
|