mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
gitweb: Use nonlocal jump instead of 'exit' in die_error
Use 'goto DONE' in place of 'exit' to end request processing in die_error() subroutine. While at it, do not end gitweb with 'exit'. This would make it easier in the future to add support or improve support for persistent environments such as FastCGI and mod_perl. It would also make it easier to make use of die_error() as an error handler (for fatalsToBrowser). Perl 5 allows non-local jumps; the restriction is that you cannot jump into a scope. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
377bee3424
commit
c42b00c8f2
|
@ -972,7 +972,8 @@ sub evaluate_path_info {
|
|||
die_error(400, "Project needed");
|
||||
}
|
||||
$actions{$action}->();
|
||||
exit;
|
||||
DONE_GITWEB:
|
||||
1;
|
||||
|
||||
## ======================================================================
|
||||
## action links
|
||||
|
@ -3432,7 +3433,7 @@ sub die_error {
|
|||
print "</div>\n";
|
||||
|
||||
git_footer_html();
|
||||
exit;
|
||||
goto DONE_GITWEB;
|
||||
}
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue