Skip to content

Remove non-standard comma-separated query parameter parsing #182

Description

@reynir

The order of parameters, presence/absence of =, and use as a list in a single parameter (?a=1,2,3) or multiple parameters (?a=1&a=2&a=3).

There are two reasons for this:

  1. The only reliable equality on URIs is per-character and so we would like access to parsed values that retain a similar equality; however, this doesn't prevent convenience functions.
  2. Some query-like interfaces distinguish between simple presence of keys and keys with values. For instance, http://erratique.ch/software/cmdliner/doc/Cmdliner.Arg.html#VALopt turned into a query string interface could have this behavior.

I made a design mistake back around 1.3 or so when I introduced the "handy" comma-separated list query value form. This makes collecting duplicate values for the same key harder than it should be and is almost completely unnecessary. I did it because I wanted to avoid a string option option type somewhere. It will be removed in 2.x (which I've been meaning to get to for over a year now...). Properly doing a 2.x design, clean-up, and test will probably require a couple weeks full time. I'm open to suggestions or pull requests for a 2.x branch.

Originally posted by @dsheets in #61

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions