Browse Source

[mod_magnet] fix regression in lighty.stat (fixes #2877)

fix regression in mod_magnet lighty.stat introduced in lighttpd 1.4.49
in commit commit:b1df38ab

x-ref:
  "lighty.stat failure"
  https://redmine.lighttpd.net/issues/2877
personal/stbuehler/fix-fdevent
Glenn Strauss 4 years ago
parent
commit
86f64a0288
  1. 6
      src/mod_magnet.c

6
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));

Loading…
Cancel
Save