Actions
Bug #2877
closedlighty.stat failure
ASK QUESTIONS IN Forums:
Description
I just upgraded to lighttpd 1.4.49 on Arch, and I started having this issue.
The issue is that `lighty.stat` causes my scripts to crash or otherwise stop executing.
I've tried, but I've had no luck getting a relevant backtrace. I'll continue working on it.
I can easily reproduce the issue by adding `lighty.stat('/an/invalid/path')` to any `mod_magnet` script and navigating to a relevant path in my browser.
Files
Updated by gstrauss over 6 years ago
- Status changed from New to Patch Pending
- Target version changed from 1.4.x to 1.4.50
Yes, that's a regression from 1.4.48. :( Looks like it was introduced in commit b1df38ab
This may fix it. I'll have time to test later this evening:
--- a/src/mod_magnet.c +++ b/src/mod_magnet.c @@ -334,14 +334,16 @@ static int magnet_stat(lua_State *L) { handler_t res; res = stat_cache_get_entry(srv, con, sb, &sce); - stat_cache_content_type_get(srv, con, sb, sce); - buffer_free(sb); if (HANDLER_GO_ON != res) { + buffer_free(sb); lua_pushnil(L); return 1; } + stat_cache_content_type_get(srv, con, sb, sce); + buffer_free(sb); + lua_newtable(L); // return value lua_pushboolean(L, S_ISREG(sce->st.st_mode));
Updated by zeroval over 6 years ago
I've tried your patch, and it seems to have worked.
Updated by gstrauss over 6 years ago
- Status changed from Patch Pending to Fixed
- % Done changed from 0 to 100
Applied in changeset 86f64a0288eed62c72a50e1b4a0f22e502e2924c.
Actions
Also available in: Atom