On Jun 20, 2007, at 2:20 PM, Julian Reschke wrote:
> Paul Sandoz wrote:
>> Definitely, i am preparing a fix that i will commit tomorrow.
>> I wonder if we should allow for a template "/helloworld/x y" which
>> is equivalent to "/helloworld/x%20y". I will punt the question to
>> the 311 list.
>
> Hm, not sure what you mean here. Is this about an unescaped space
> character appearing in the path? It shouldn't (and my preference
> would be that the container rejects requests like that with a
> status of 400).
>
I think Paul means whether the @UriTemplate annotation's value should
be an escaped or unescaped string.
> A related question is whether the framework is supposed to do
> something with percent-escaped non-ASCII characters. That would
> have the beauty that there's one thing less people can do wrong...
>
My working assumption (which isn't reflected in the Javadoc right
now) is that @UriParam, @QueryParam and @MatrixParam will all do any
unescaping automatically so in your example you'd get "Hello x y"
rather than "Hello x%20y" for a GET on /helloworld/x%20y.
We should have this discussion on dev_at_jsr311 - I'll send a note
something shortly.
Marc.
---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.
- application/pkcs7-signature attachment: smime.p7s