Re: URI and IRI Templating - encoding defaults

Ok, one month to get around to a reply is way too long. Sorry about
that. More in-line.

On 1/15/07, Mark Nottingham <mnot@mnot.net> wrote:
> I agree that embedding encoding information isn't desirable, but using:
>
> >   Characters outside ( iprivate | iunreserved | '@' | ':' | '/' )
> > are % encoded.
>
> as the default encoding rule means that sub-delims ("!" / "$" / "&" /
> "'" / "(" / ")" / "*" / "+" / "," / ";" / "=") will *always* be
> encoded when expanded from templates; there won't be any way to have
> these perfectly legal characters appear in template-generated URIs.

They will appear, it just means that they will be percent-encoded, that is, you
can't use them as delimiters.

> Also, "?" will always be percent-encoded in query and fragment
> components, even though it's allowed.
>
> After just a quick browse around the Web, that's too restrictive;
> most URI schemes do not use all of the sub-delims, and leave them for
> use by specific formats and applications. If they're always percent-
> encoded, these use cases won't be allowed.
>
> For example,
> * EBay uses "*" and "+" as part of their search URIs; <http://attr-
> search.ebay.com/search/search.dll?
> sofocus=so&sbrftog=1&catref=C6&from=R10&fccl=1&fcl=4&satitle=razr
> +v3*&sacat=146487%26catref%3DC6%26curcat%

And if you change that '+' to %2b, or the '*' to a %2a, the query still works.

> * Amazon uses "=" in path parameters; <http://www.amazon.com/Concise-
> History-Cambridge-Histories-Updated/dp/0521408482/ref=wl_gtwy_ty/
> 102-8627554-9105730?%
> 5Fencoding=UTF8&coliid=IIU7YZ0J27A5W&colid=2ATYUNX0NQEE> (from
> Amazon's front page). I guess they could do </ref={ref}/>, but what
> if they want to allow several different parameters there?

Again, replace that '=' with a %3d and the URI still works.

The same is true for all the examples you listed.

True, you can't have template values span multiple components, but
I thought we had already decided against that use case.

   -joe

-- 
Joe Gregorio        http://bitworking.org

Received on Friday, 16 February 2007 18:48:37 UTC