Skip to content

Commit 5bfd536

Browse files
committed
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
2 parents 3919d40 + 5ed2ec1 commit 5bfd536

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

gitweb/gitweb.perl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,15 @@ sub run {
11091109

11101110
run();
11111111

1112+
if (defined caller) {
1113+
# wrapped in a subroutine processing requests,
1114+
# e.g. mod_perl with ModPerl::Registry, or PSGI with Plack::App::WrapCGI
1115+
return;
1116+
} else {
1117+
# pure CGI script, serving single request
1118+
exit;
1119+
}
1120+
11121121
## ======================================================================
11131122
## action links
11141123

0 commit comments

Comments
 (0)