W3C home > Mailing lists > Public > uri@w3.org > January 2007

Re: URI and IRI Templating - encoding defaults

From: Benjamin Carlyle <benjamincarlyle@optusnet.com.au>
Date: Sun, 21 Jan 2007 14:08:23 +1000
To: Mark Nottingham <mnot@mnot.net>
Cc: Marc Hadley <Marc.Hadley@Sun.COM>, Joe Gregorio <joe@bitworking.org>, James M Snell <jasnell@gmail.com>, uri@w3.org
Message-Id: <1169352503.6978.23.camel@localhost.localdomain>

On Tue, 2007-01-16 at 14:17 +1100, Mark Nottingham wrote:
> Proposal: only escape things outside of ( iprivate / iunreserved /  
> ireserved ) -- i.e., characters not allowed in URIs. It's up to the  
> definitions of specific template variables to determine how to  
> percent-encode beyond that.

I concur, and add a few extra reasons:

1. Sometimes it may be useful to substitute a whole query part, or whole
sigificant segment of a url. Eg, http://example.com{pathToResource}
2. Sometimes it may be even useful to substitute the whole url:

This actually suggests to me that perhaps no blanket rule should be
included in the specification. It is simply the responsibility of the
supporting instructions to construct a valid URL. Encoding ( iprivate /
iunreserved / ireserved) into the specification ties uri templates to
the current uri rfc, creating unnecessary coupling.

Even restricting resultant urls to be valid may be overreaching. After
all, should a browser decide the url isn't valid and stop the
submission? Shouldn't it just pass the information it doesn't understand
through and let the server side decide what is valid and what is not? I
would be as circumspect as possible in the specification as to what
constitutes valid output.

Received on Sunday, 21 January 2007 04:08:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:10 UTC