haskell / network-uri

URI manipulation facilities
Other
24 stars 33 forks source link

`parseQuery` should split on `?` as well #41

Closed robinp closed 5 years ago

robinp commented 5 years ago

According to https://tools.ietf.org/html/rfc3986#section-3.4, the query parameters are possible to be separated by ? marks. In fact, this is the main separator, while & is an application-specific sub-separator that happens to be often used for HTTP URIs.

https://kythe.io/docs/kythe-uri-spec.html uses ?s for separators, which is RFC-compatible. For example: kythe://something?root=bin/bla?path=foobar#anchor.

robinp commented 5 years ago

Actually, I retract. ? seems to be a gen-delim, while & a sub-delim, so using latter inside the query seems more advised (as well as say ;). Closing until sorting with Kythe team.