]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb/Makefile: fix typo in gitweb.min.css rule
[Gitweb] / gitweb.perl
index 19b5a442dc60be1e56072ed14546d9dadddb94ad7e4204be3e60ea2f33310440..d3aa80fc318e7254723010c60d8f23e2e77f96c7fc39694c02b39905e5a14659 100755 (executable)
@@ -1110,6 +1110,15 @@ sub run {
 
 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
 
 ## ======================================================================
 ## action links
 
@@ -3395,7 +3404,7 @@ sub git_header_html {
        }
        print $cgi->header(-type=>$content_type, -charset => 'utf-8',
                           -status=> $status, -expires => $expires)
        }
        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 <<EOF;
 <?xml version="1.0" encoding="utf-8"?>
        my $mod_perl_version = $ENV{'MOD_PERL'} ? " $ENV{'MOD_PERL'}" : '';
        print <<EOF;
 <?xml version="1.0" encoding="utf-8"?>
This page took 0.099017 seconds and 4 git commands to generate.