Skip to content

Commit

Permalink
Merge 406b813 into 9023699
Browse files Browse the repository at this point in the history
  • Loading branch information
ap committed Feb 16, 2015
2 parents 9023699 + 406b813 commit 3dc15a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Plack/Request.pm
Expand Up @@ -88,7 +88,7 @@ sub _parse_query {
if (defined $query_string) {
@query =
map { s/\+/ /g; URI::Escape::uri_unescape($_) }
map { /=/ ? split(/=/, $_, 2) : ($_ => '')}
map { '' eq $_ ? () : /=/ ? split(/=/, $_, 2) : ($_ => '') }
split(/[&;]/, $query_string);
}

Expand Down
2 changes: 2 additions & 0 deletions t/Plack-Request/params.t
Expand Up @@ -21,6 +21,8 @@ is $req->param('foo'), "baz";
is_deeply [ $req->param('foo') ] , [ qw(bar baz) ];
is_deeply [ sort $req->param ], [ 'bar', 'foo' ];

my $req = Plack::Request->new({ QUERY_STRING => "&&foo=bar" });
is_deeply $req->parameters, { foo => "bar" };

done_testing;

0 comments on commit 3dc15a2

Please sign in to comment.