Marc Portier | 9 Aug 2011 08:50
Picon

uri-templates implementation feedback.

Hi all,

I've finally come round to updating my js implementation to the latest 
state of the spec (that is currently r71 at 
http://code.google.com/p/uri-templates/)

I know this has no official 0.6 label (yet), but since it fixed some 
samples and removed some more requirements (e.g. the 'default') lazy me 
thought this to be an easier goal.

Anyway, here some findings:

[unnamed list expansion for ; matrix-params]
Anyway: I only have one case that made me add some quirk to comply to:
   {;list*}              ;red;green;blue

Without the quirk my implementation produced:
   {;list*}              ;list=red;list=green;list=blue

Well, I obviously don't like quirks, but sentiments aside I am left to 
wonder if the matrix-parameters are not always expected to carry a name?

[encoded names]

If I understood the spec correctly the varspec-names can contain 
pcnt-encoded characters, and should be decoded to translate onto 
context-keys.

Thus the following expansions should work out as listed, right?

(Continue reading)

Roy T. Fielding | 13 Aug 2011 01:36
Favicon
Gravatar

Re: uri-templates implementation feedback.

On Aug 8, 2011, at 11:50 PM, Marc Portier wrote:

> Hi all,
> 
> I've finally come round to updating my js implementation to the latest state of the spec (that is currently
r71 at http://code.google.com/p/uri-templates/)
> 
> I know this has no official 0.6 label (yet), but since it fixed some samples and removed some more
requirements (e.g. the 'default') lazy me thought this to be an easier goal.
> 
> Anyway, here some findings:
> 
> 
> [unnamed list expansion for ; matrix-params]
> Anyway: I only have one case that made me add some quirk to comply to:
>  {;list*}              ;red;green;blue
> 
> Without the quirk my implementation produced:
>  {;list*}              ;list=red;list=green;list=blue
> 
> Well, I obviously don't like quirks, but sentiments aside I am left to wonder if the matrix-parameters are
not always expected to carry a name?

When I added path params to URLs in RFC 1808, the intention was
to be closer to VAX/VMS-style path versioning rather than matrix.
In fact, I'd say matrix is bunk -- there was never any need to
supplant query params with path params.

I'd rather not change the above.  If a path has a variable list
of parameters and key=value is desired, then provide the value as
(Continue reading)


Gmane