Skip to content

Clean up query term discussion #925

@jandrieu

Description

@jandrieu

There's an unstated assumption in some of our work that the query part in a DID URL is comprised of key-value pairs, such as https://example.com?foo=1&bar=2 This is, unfortunately, incorrect.

For example, in the query section, https://w3c.github.io/did/#query we have

Note: Avoid comparison of DID URLs containing multiple query parameters
Implementers are urged to avoid comparing DID URLs for equivalence when they have more than one query parameter without a specification specifically designed for that purpose. This specification defines no normalization rules for query parameters, and any query parameter normalization rules defined at the DID Method specification or application layer are not universally recognized rules.

However, as queries are currently defined

A DID query is identical to a generic URI query and conforms to the query ABNF rule in RFC 3986, section 3.4.

and from 3986

  URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
  query       = *( pchar / "/" / "?" )

There is only ever one query part to a DID URL.

Further, we are exceptionally clear in that section that we provide no further normalization rules.

So, restricted to just what is in 3986 means that duplicate query parameters are not a thing.

To wit,

The URL https://example.com?foo=good&bar=bad&foo=ugly contains just one query part, foo=good&bar=bad&foo=ugly

We probably have multiple places in various specs that get this wrong. DID Resolution is what I'm working on now, and it definitely needs help.

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