Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
22d395ee
Commit
22d395ee
authored
Jan 06, 2008
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 407420: CGI::Carp fatalsToBrowser should happen as early as possible
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=justdave, a=mkanat
parent
c2ebd1bb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
Bugzilla.pm
Bugzilla.pm
+9
-0
CGI.pm
Bugzilla/CGI.pm
+0
-7
mod_perl.pl
mod_perl.pl
+5
-0
No files found.
Bugzilla.pm
View file @
22d395ee
...
...
@@ -26,6 +26,15 @@ package Bugzilla;
use
strict
;
# We want any compile errors to get to the browser, if possible.
BEGIN
{
# This makes sure we're in a CGI.
if
(
$ENV
{
SERVER_SOFTWARE
}
&&
!
$ENV
{
MOD_PERL
})
{
require
CGI::
Carp
;
CGI::
Carp
->
import
(
'fatalsToBrowser'
);
}
}
use
Bugzilla::
Config
;
use
Bugzilla::
Constants
;
use
Bugzilla::
Auth
;
...
...
Bugzilla/CGI.pm
View file @
22d395ee
...
...
@@ -62,13 +62,6 @@ sub new {
my
$self
=
$class
->
SUPER::
new
(
@args
);
if
(
Bugzilla
->
error_mode
eq
ERROR_MODE_WEBPAGE
)
{
# This happens here so that command-line scripts don't spit out
# their errors in HTML format.
require
CGI::
Carp
;
import
CGI::
Carp
qw(fatalsToBrowser)
;
}
# Make sure our outgoing cookie list is empty on each invocation
$self
->
{
Bugzilla_cookie_list
}
=
[]
;
...
...
mod_perl.pl
View file @
22d395ee
...
...
@@ -92,6 +92,11 @@ sub handler : method {
# $0 is broken under mod_perl before 2.0.2, so we have to set it
# here explicitly or init_page's shutdownhtml code won't work right.
$0
=
$ENV
{
'SCRIPT_FILENAME'
};
# Make all errors go to the browser, not the log.
require
CGI::
Carp
;
CGI::
Carp
->
import
(
'fatalsToBrowser'
);
Bugzilla::
init_page
();
return
$class
->
SUPER::
handler
(
@_
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment