summaryrefslogtreecommitdiff
path: root/gitweb/gitweb.perl
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-06-22 09:45:22 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-06-22 09:45:22 -0700
commit5bfd53629e93113a17fe7d6a7a24554dc3c17cdb (patch)
tree4f0f398e738ae73a9f31cb2aa2495b16a919a0a3 /gitweb/gitweb.perl
parentMerge branch 'bd/maint-unpack-trees-parawalk-fix' (diff)
parentgitweb: Return or exit after done serving request (diff)
downloadtgif-5bfd53629e93113a17fe7d6a7a24554dc3c17cdb.tar.xz
Merge branch 'jn/gitweb-return-or-exit-cleanup'
* jn/gitweb-return-or-exit-cleanup: gitweb: Return or exit after done serving request Conflicts: gitweb/gitweb.perl
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-xgitweb/gitweb.perl9
1 files changed, 9 insertions, 0 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 9e5e0bf3ee..9446376535 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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