Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

parse query_string like "?foo+bar" into { "foo bar" => "" } #445

Merged
merged 1 commit into from Jan 31, 2014

Conversation

Projects
None yet
3 participants
Contributor

kazeburo commented Jan 31, 2014

Current Plack::Request parses query_string like ?foo+bar query into { foo => "", bar => ""}.
But this behavior is not popular. Mojo::Parameter, ruby's Rack, python's WebOb and node.js will parse that query_string into { "foo bar" => "" }

In addition, CGI specifications splits query_string that does not contain "=" by "+" and treats as command line arguments. Behavior of cunnrent Plack::Request query_string parser does not match with the specifications of the CGI.

@kazeburo kazeburo encode path?foo+bar as { "foo bar" => "" }. not { "foo" => "", "bar" …
…=> "" }

Mojo::Parameter, ruby's Rack, python's WebOb and node.js parse query_string in this way
848f119
Owner

miyagawa commented Jan 31, 2014

cc @yannk you made this change at #298.

Owner

miyagawa commented Jan 31, 2014

I'm +1 on this PR.

Contributor

yannk commented Jan 31, 2014

+1

@miyagawa miyagawa added a commit that referenced this pull request Jan 31, 2014

@miyagawa miyagawa Merge pull request #445 from kazeburo/master
parse query_string like "?foo+bar" into { "foo bar" => "" }
9c8a5bc

@miyagawa miyagawa merged commit 9c8a5bc into plack:master Jan 31, 2014

1 check passed

default The Travis CI build passed
Details

@chansen chansen referenced this pull request in chansen/p5-url-encode Feb 1, 2014

Closed

support ";\s*" separater and valuless keys #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment