Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jn/gitweb-return-or-exit-cleanup'
author
Junio C Hamano
<gitster@pobox.com>
Tue, 22 Jun 2010 16:45:22 +0000
(09:45 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 22 Jun 2010 16:45:22 +0000
(09:45 -0700)
* jn/gitweb-return-or-exit-cleanup:
gitweb: Return or exit after done serving request
Conflicts:
gitweb/gitweb.perl
gitweb/gitweb.perl
patch
|
blob
|
history
raw
(from parent 1:
3919d40
)
diff --git
a/gitweb/gitweb.perl
b/gitweb/gitweb.perl
index 9e5e0bf3ee6a86df6329da145f7f597e7abf491f..9446376535b1790c2400cd5bbc1e12f1a8b8f7c9 100755
(executable)
--- 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