parse params in crystal
icr(0.23.1) > HTTP::Params.parse("&&")
=> HTTP::Params(@raw_params={"" => ["", "", ""]})
parse params in ruby
2.4.1 :029 > CGI::parse("&&")
=> {}
Crystal 0.23.1 (2017-10-12) LLVM 4.0.1
What about these examples?
```cr
HTTP::Params.parse("a=b&&c=d") # => HTTP::Params(@raw_params={"a" => ["b"], "" => [""], "c" => ["d"]})
HTTP::Params.parse("&&c=d") # => HTTP::Params(@raw_params={"" => ["", ""], "c" => ["d"]})
HTTP::Params.parse("a=b&&") # => HTTP::Params(@raw_params={"a" => ["b"], "" => ["", ""]})
That is still works.
$ bin/crystal test.cr
HTTP::Params.parse("a=b&&c=d") # => HTTP::Params(@raw_params={"a" => ["b"], "c" => ["d"]})
HTTP::Params.parse("&&c=d") # => HTTP::Params(@raw_params={"c" => ["d"]})
HTTP::Params.parse("a=b&&") # => HTTP::Params(@raw_params={"a" => ["b"]})
Because two & split the string into three parts, and remove both key and value are empty. Do I add these tests? @RX14
@akiicat sorry, my bad! I was testing those examples with the wrong compiler and thought they were broken. You can add them to the specs if you want but it's fine without.
Most helpful comment
What about these examples?
```cr
HTTP::Params.parse("a=b&&c=d") # => HTTP::Params(@raw_params={"a" => ["b"], "" => [""], "c" => ["d"]})
HTTP::Params.parse("&&c=d") # => HTTP::Params(@raw_params={"" => ["", ""], "c" => ["d"]})
HTTP::Params.parse("a=b&&") # => HTTP::Params(@raw_params={"a" => ["b"], "" => ["", ""]})