summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Quantum
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-06-16 00:30:47 +0200
committerDylan William Hardison <dylan@hardison.net>2018-06-28 22:41:58 +0200
commitd384888e734489a1524ca3ab1ad271343258bdea (patch)
treef154c18e1375d2bfb95c3d081f34f7b0136e6cdf /Bugzilla/Quantum
parentb3a6e0da65144921a99a369398dd390f5c65bef3 (diff)
downloadbugzilla-d384888e734489a1524ca3ab1ad271343258bdea.tar.gz
bugzilla-d384888e734489a1524ca3ab1ad271343258bdea.tar.xz
fix more tests, hopefully
Diffstat (limited to 'Bugzilla/Quantum')
-rw-r--r--Bugzilla/Quantum/CGI.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/Bugzilla/Quantum/CGI.pm b/Bugzilla/Quantum/CGI.pm
index 353d8651e..287305ad3 100644
--- a/Bugzilla/Quantum/CGI.pm
+++ b/Bugzilla/Quantum/CGI.pm
@@ -102,7 +102,13 @@ sub _ENV {
$remote_user = $authenticate =~ /Basic\s+(.*)/ ? b64_decode $1 : '';
$remote_user = $remote_user =~ /([^:]+)/ ? $1 : '';
}
- my $path_info = $c->stash('PATH_INFO') || '';
+ my $path_info = delete $c->stash->{'mojo_captures'}{PATH_INFO};
+ my %captures = %{ $c->stash->{'mojo.captures'} // {} };
+ foreach my $key (keys %captures) {
+ delete $captures{$key} if $key =~ /^REWRITE_/;
+ }
+ my $cgi_query = Mojo::Parameters->new(%captures);
+ $cgi_query->append($req->url->query);
return (
CONTENT_LENGTH => $content_length || 0,
@@ -110,7 +116,7 @@ sub _ENV {
GATEWAY_INTERFACE => 'CGI/1.1',
HTTPS => $req->is_secure ? 'YES' : 'NO',
%env_headers,
- QUERY_STRING => $c->stash('cgi.query_string') || $req->url->query->to_string,
+ QUERY_STRING => $cgi_query->to_string,
PATH_INFO => $path_info ? "/$path_info" : '',
REMOTE_ADDR => $tx->remote_address,
REMOTE_HOST => gethostbyaddr( inet_aton( $tx->remote_address || '127.0.0.1' ), AF_INET ) || '',