X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/0fa5db2fad6d3d78e8685b90da95f71bc54082572d54d2ea9441f316891f185c..b0ed4835e5b509f56bbc86a3bb4559eb4c765d8b7a3d760cba6cb1fb1eee93c0:/gitweb.perl?ds=sidebyside diff --git a/gitweb.perl b/gitweb.perl index 19b5a44..d3aa80f 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -1110,6 +1110,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 @@ -3395,7 +3404,7 @@ sub git_header_html { } print $cgi->header(-type=>$content_type, -charset => 'utf-8', -status=> $status, -expires => $expires) - unless ($opts{'-no_http_headers'}); + unless ($opts{'-no_http_header'}); my $mod_perl_version = $ENV{'MOD_PERL'} ? " $ENV{'MOD_PERL'}" : ''; print <