users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Re: Re: Re: Re: Re: UriBuilder.segment and build with encodePathSlash

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Wed, 24 Oct 2012 11:42:51 +0100

Marek,
On 24/10/12 10:26, Marek Potociar wrote:
>
> On Oct 23, 2012, at 11:40 PM, Markus KARG<markus_at_headcrashing.eu> wrote:
>
>>> But you are forgetting:
>>>
>>> GET /root/foo/bar/baz
>>>
>>>
>>> @Path("/root/{a}")
>>> class Resource {
>>>
>>> @GET
>>> @Path("{b: .*}")
>>> public boolean get(...what you had before...
>>> }
>>>
>>> In this case the '/' is not encoded. If the client is getting a
>>> template, it has no idea if the server is expecting '/' to get encoded
>>> or not. IMO, '/' is a legal character so encoding '/' should be an
>>> extreme edge case.
>>
>> We seem to live in completely different worlds, as frankly spoken I never
>> use {b: .*} in JAX-RS but virtually always have @Path({a}/{b}) patterns
>> hence need encoded slashes, so I see it completely reverse: Yours is the
>> extreme edge case.
>>
>> As we cannot find a consensus, Marek should decide.
>
> There's nothing to decide. It's already been decided. I'm just trying to explain the decision. While I said I am not going to reopen this one, it's better if people understand the decision and take it for their own if possible. If not, at least I tried.
>
While I dislike the current dilution of UriBuilder interface (and I wish
I had this thread running a bit earlier where I could've challenged it
more strongly), I support you trying to clearly describe the whole
rationale behind the decision once again - this is how things should be
done all the time IMHO

Sergey

> Marek
>
>>
>> Regards
>> Markus
>>
>