[mod_magnet] reset after error attaching content
reset after error raised attaching content (The lua stack has been unwound after the exception) (Might avoid reloading script if an alt env is used; not tested)personal/stbuehler/tests-path
parent
d0273c8af5
commit
5c9eb60c8c
|
@ -2413,7 +2413,10 @@ static handler_t magnet_attract(request_st * const r, plugin_data * const p, scr
|
|||
r->handler_module = p->self;
|
||||
}
|
||||
} else {
|
||||
lua_settop(L, 2); /* remove all but function and lighty table */
|
||||
if (lua_gettop(L) > 2)
|
||||
lua_settop(L, 2); /* remove all but function and lighty table */
|
||||
else if (lua_gettop(L) != 2)
|
||||
lua_settop(L, 0); /* throw everything away; force script reload */
|
||||
r->http_status = 500;
|
||||
r->handler_module = NULL;
|
||||
http_response_body_clear(r, 0);
|
||||
|
|
Loading…
Reference in New Issue