From: Aristotle Pagaltzis Date: Mon, 16 Feb 2015 13:50:21 +0000 (+0100) Subject: stop using cached Hash::MultiValue from env X-Git-Tag: 5.90083~2^2^2~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=5aca55994d0ff64a75ea7d0900dfff545b36d103 stop using cached Hash::MultiValue from env Plack::Request and Catalyst::Request have incompatible semantics for naked parameters: P::Rq parses them as keys with empty-string values while C::Rq parses them as keys with an undef value. Therefore even if a Hash::MultiValue object was cached by P::Rq in the environment, it is wrong to reuse it. --- diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index cd0d383..cac63de 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -574,14 +574,6 @@ sub prepare_query_parameters { my ($self, $c) = @_; my $env = $c->request->env; - if(my $query_obj = $env->{'plack.request.query'}) { - $c->request->query_parameters( - $c->request->_use_hash_multivalue ? - $query_obj->clone : - $query_obj->as_hashref_mixed); - return; - } - my $query_string = exists $env->{QUERY_STRING} ? $env->{QUERY_STRING} : '';