Commits

Anonymous committed 5bfd536 Merge with conflicts

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

  • Participants
  • Parent commits 3919d40, 5ed2ec1

Comments (0)

Files changed (1)

gitweb/gitweb.perl

 
 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