From: Jo-Philipp Wich Date: Tue, 2 Aug 2022 11:40:28 +0000 (+0200) Subject: ucode: ignore exit exceptions X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=f9db53870705f7c708e8fb93aed8dd636adafc94;p=project%2Fuhttpd.git ucode: ignore exit exceptions A request handler might legitimately call `exit()`, don't raise a server error in this case. Signed-off-by: Jo-Philipp Wich Tested-by: Stijn Tintel --- diff --git a/ucode.c b/ucode.c index 69da3da..e76f441 100644 --- a/ucode.c +++ b/ucode.c @@ -195,6 +195,9 @@ uh_ucode_exception(uc_vm_t *vm, uc_exception_t *ex) { uc_value_t *ctx; + if (ex->type == EXCEPTION_EXIT) + return; + printf("Status: 500 Internal Server Error\r\n\r\n" "Exception while executing ucode program %s:\n", current_prefix->handler);