diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-06-16 01:11:03 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-06-28 22:41:58 +0200 |
commit | 561a205df8fdb1950df167c6915d52601630c08a (patch) | |
tree | 906844fca79dae4cd1b608d33e1cdaf926fcddab | |
parent | d384888e734489a1524ca3ab1ad271343258bdea (diff) | |
download | bugzilla-561a205df8fdb1950df167c6915d52601630c08a.tar.gz bugzilla-561a205df8fdb1950df167c6915d52601630c08a.tar.xz |
fix more tests
-rw-r--r-- | Bugzilla/Quantum.pm | 3 | ||||
-rw-r--r-- | Bugzilla/Quantum/CGI.pm | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Bugzilla/Quantum.pm b/Bugzilla/Quantum.pm index 67d016d46..5cc8c8243 100644 --- a/Bugzilla/Quantum.pm +++ b/Bugzilla/Quantum.pm @@ -74,8 +74,9 @@ sub startup { $r->any('/')->to('CGI#index_cgi'); $r->any('/rest')->to('CGI#rest_cgi'); - $r->any('/extensions/BzAPI/bin/rest.cgi/*PATH_INFO')->to('CGI#bzapi_cgi'); $r->any('/rest/*PATH_INFO')->to( 'CGI#rest_cgi' => { PATH_INFO => '' }); + $r->any('/bug/:id')->to('CGI#show_bug_cgi'); + $r->any('/extensions/BzAPI/bin/rest.cgi/*PATH_INFO')->to('CGI#bzapi_cgi'); $r->get( '/__lbheartbeat__' => sub { my $c = shift; diff --git a/Bugzilla/Quantum/CGI.pm b/Bugzilla/Quantum/CGI.pm index 287305ad3..32fffa30e 100644 --- a/Bugzilla/Quantum/CGI.pm +++ b/Bugzilla/Quantum/CGI.pm @@ -102,10 +102,12 @@ sub _ENV { $remote_user = $authenticate =~ /Basic\s+(.*)/ ? b64_decode $1 : ''; $remote_user = $remote_user =~ /([^:]+)/ ? $1 : ''; } - my $path_info = delete $c->stash->{'mojo_captures'}{PATH_INFO}; + my $path_info = $c->param('PATH_INFO'); my %captures = %{ $c->stash->{'mojo.captures'} // {} }; foreach my $key (keys %captures) { - delete $captures{$key} if $key =~ /^REWRITE_/; + if ($key eq 'action' || $key eq 'PATH_INFO' || $key =~ /^REWRITE_/) { + delete $captures{$key}; + } } my $cgi_query = Mojo::Parameters->new(%captures); $cgi_query->append($req->url->query); |