It would be easier to comment if either the pull request or this thread
explained what the patch is trying to do (XY problem etc) but in general:

- the URI spec defines ? as the separator character between the path and
the query part, but it doesn't say much about what the path and query part
*are* (except that the path specifies a resource in a hierarchical manner,
and the query specifies it in a non-hierarchical manner). So a web
application using something other for separating the query part will
violate the spirit of the spec but probably won't experience any problems.
Haven't heard of anything doing that before; this display.w3p thing seems
like some super-obscure web framework only used by Australian and
Singaporean government web pages.

- the URI spec does not say anything about the contents of the query part.
It specifies ;/!?:@&=+*$,'[]() as the set of reserved characters, so those
are the only sane choices for separating sub-arguments (as everything else
might get percent-encoded by the browser, but reserved characters are
guaranteed to be preserved). The choice of & and = as argument separator
and key-value separator are a common convention, and used by some standards
such as x-www-form-urlencoded, but a web application is free to choose
something else in theory. In practice I think only very old and fringe ones
do.

- the URI spec allows parameters in path segments (sometimes called matrix
parameters). https://www.w3.org/DesignIssues/MatrixURIs.html has some
examples. The older URI RFC, 2396, prescribed the semicolon as the
parameter separator; RFC 3986 allows any reserved character; but in
practice usually it's a semicolon. These are used a fair bit in RESTish
URLs; Angular uses them, for example. When only the last path segment has
parameters, the URL has the same structure as the one in the pull request.



On Fri, Oct 20, 2017 at 1:07 PM, Ryan Kaldari <rkald...@wikimedia.org>
wrote:

> Could someone knowledgeable about URL encoding take a look at this pull
> request? Thanks!
> https://github.com/wikimedia/DeadlinkChecker/pull/26/files
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to