diff options
Diffstat (limited to 'mod_perl.pl')
-rw-r--r-- | mod_perl.pl | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/mod_perl.pl b/mod_perl.pl index f3dae34c1..627057777 100644 --- a/mod_perl.pl +++ b/mod_perl.pl @@ -59,9 +59,13 @@ Bugzilla::CGI->compile(qw(:cgi :push)); use Apache2::SizeLimit; # This means that every httpd child will die after processing -# a CGI if it is taking up more than 45MB of RAM all by itself, +# a CGI if it is taking up more than 1600MB of RAM all by itself, # not counting RAM it is sharing with the other httpd processes. -Apache2::SizeLimit->set_max_unshared_size(45_000); +if (Bugzilla->params->{'urlbase'} eq 'https://bugzilla.mozilla.org/') { + Apache2::SizeLimit->set_max_unshared_size(500_000); +} else { + Apache2::SizeLimit->set_max_unshared_size(250_000); +} my $cgi_path = Bugzilla::Constants::bz_locations()->{'cgi_path'}; @@ -80,7 +84,7 @@ PerlChildInitHandler "sub { Bugzilla::RNG::srand(); srand(); }" PerlResponseHandler Bugzilla::ModPerl::ResponseHandler PerlCleanupHandler Apache2::SizeLimit Bugzilla::ModPerl::CleanupHandler PerlOptions +ParseHeaders - Options +ExecCGI + Options +ExecCGI +FollowSymLinks AllowOverride Limit FileInfo Indexes DirectoryIndex index.cgi index.html </Directory> @@ -118,6 +122,7 @@ package Bugzilla::ModPerl::ResponseHandler; use strict; use base qw(ModPerl::Registry); use Bugzilla; +use Bugzilla::Constants qw(USAGE_MODE_REST); sub handler : method { my $class = shift; @@ -135,7 +140,13 @@ sub handler : method { use warnings; Bugzilla::init_page(); - return $class->SUPER::handler(@_); + my $result = $class->SUPER::handler(@_); + + # When returning data from the REST api, tell Apache not to append its + # error html documents to the response. + return Bugzilla->usage_mode == USAGE_MODE_REST + ? Apache2::Const::OK + : $result; } |