diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 2365311d9..9d2b8c3b6 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1000,8 +1000,16 @@ sub handle_errors_html { die_error(400, "Project needed"); } $actions{$action}->(); + DONE_GITWEB: -1; +if (defined caller) { + # wrapped in a subroutine processing requests, + # e.g. mod_perl with ModPerl::Registry, or PSGI with Plack::App::WrapCGI + return; +} else { + # pure CGI script, serving single request + exit; +} ## ====================================================================== ## action links