diff options
Diffstat (limited to 'Bugzilla/CGI.pm')
-rw-r--r-- | Bugzilla/CGI.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index 99957c59c..b38c248a4 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -601,11 +601,18 @@ sub header { } my $headers = $self->SUPER::header(%headers) || ''; if ($self->server_software eq 'Bugzilla::Quantum::CGI') { - my $c = $Bugzilla::C; + my $c = $Bugzilla::Quantum::CGI::C; $c->res->headers->parse($headers); - if ($c->res->headers->status =~ /^([0-9]+)/) { + my $status = $c->res->headers->status; + if ($status && $status =~ /^([0-9]+)/) { $c->res->code($1); } + elsif ($c->res->headers->location) { + $c->res->code(302); + } + else { + $c->res->code(200); + } return ''; } else { |