Code

Merge branch 'tr/send-email-8bit'
[git.git] / gitweb / gitweb.perl
index 9e5e0bf3ee6a86df6329da145f7f597e7abf491f..9446376535b1790c2400cd5bbc1e12f1a8b8f7c9 100755 (executable)
@@ -1109,6 +1109,15 @@ sub run {
 
 run();
 
+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