summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-22 09:45:22 -0700
committerJunio C Hamano <gitster@pobox.com>2010-06-22 09:45:22 -0700
commit5bfd53629e93113a17fe7d6a7a24554dc3c17cdb (patch)
tree4f0f398e738ae73a9f31cb2aa2495b16a919a0a3 /gitweb
parent3919d40cfb23b2c763a4979c4a1512424adc8442 (diff)
parent5ed2ec1041b6aeec81b0f0a9775355a9b2c755a6 (diff)
downloadgit-5bfd53629e93113a17fe7d6a7a24554dc3c17cdb.tar.gz
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')
-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