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

Re: URI Templates - optional variables?

From: Stefan Eissing <stefan@eissing.org>
Date: Tue, 31 Jul 2007 14:44:11 -0400
Message-Id: <9162F796-1D23-4B43-9711-535994FDE010@eissing.org>
Cc: <uri@w3.org>
To: Mike Schinkel <mikeschinkel@gmail.com>




Am 30.07.2007 um 19:55 schrieb Mike Schinkel:
> 1.) http://www.example.com/{foo?}/
>
> For foo="bar", URL=  http://www.example.com/bar/
> For foo="" or foo=null, URL=  http://www.example.com/  (no double
> forward-slash)

I think it would make sense to say that a template to uri converter  
MUST perform path resolution as described in RFC 3986 ch. 5.2.3 and  
5.2.4. That will also stop some injections of "." and ".." into URIs  
while saving the client from worrying to much about double "/" and such.

> 2.) http://www.example.com/?foo={foo?}
>
> For foo="bar", URL=  http://www.example.com/?foo=bar
> For foo="" or foo=null, URL=  http://www.example.com/  (no question  
> mark)

This alone will not work. There is a difference between an absent and  
an empty parameter for some applications (e.g. they want to see  
"http://www.example.com/?foo=" ).

Cheers,

Stefan
Received on Tuesday, 31 July 2007 18:44:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:37 GMT