diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-05-21 05:16:37 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-06-28 22:41:56 +0200 |
commit | 873074873fe5e27e853e5ce3d83b078280a29c2a (patch) | |
tree | 43cc385ce49a98429151329a370ab7225b52dfc3 /Bugzilla/CGI.pm | |
parent | 889d8ad22855191773dd45e67272650d0c00f502 (diff) | |
download | bugzilla-873074873fe5e27e853e5ce3d83b078280a29c2a.tar.gz bugzilla-873074873fe5e27e853e5ce3d83b078280a29c2a.tar.xz |
more things work
Diffstat (limited to 'Bugzilla/CGI.pm')
-rw-r--r-- | Bugzilla/CGI.pm | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index 78037292a..d43a26eab 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -94,7 +94,7 @@ sub new { # Under mod_perl, CGI's global variables get reset on each request, # so we need to set them up again every time. - $class->_init_bz_cgi_globals() if $ENV{MOD_PERL}; + $class->_init_bz_cgi_globals(); my $self = $class->SUPER::new(@args); @@ -561,10 +561,10 @@ sub header { } } my $headers = $self->SUPER::header(%headers) || ''; - + warn "if (". $self->server_software." eq 'Bugzilla::Quantum::Plugin::Glue') {"; if ($self->server_software eq 'Bugzilla::Quantum::Plugin::Glue') { - my $c = Bugzilla::request_cache->{mojo_controller}; - $c->res->headers(Mojo::Headers->parse($headers)); + my $c = Bugzilla->request_cache->{mojo_controller}; + $c->res->headers(Mojo::Headers->new->parse($headers)) if $headers; return ''; } else { @@ -671,7 +671,15 @@ sub send_cookie { sub redirect { my $self = shift; $self->{bz_redirecting} = 1; - return $self->SUPER::redirect(@_); + warn "redirect: @_\n"; + if ($self->server_software eq 'Bugzilla::Quantum::Plugin::Glue') { + my $c = Bugzilla->request_cache->{mojo_controller}; + $c->redirect_to(@_); + return ''; + } + else { + return $self->SUPER::redirect(@_); + } } # This helps implement Bugzilla::Search::Recent, and also shortens search |