users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Re: slashes in buildEncoded

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Fri, 15 Mar 2013 15:43:07 +0100

On Mar 10, 2013, at 7:06 PM, Sergey Beryozkin <sberyozkin_at_talend.com> wrote:

> On 08/03/13 21:50, Bill Burke wrote:
>> What is the output of:
>>
>> URI uri = UriBuilder("/{param}").buildFromEncoded("A/B");
>>
>> Is it: "/A/B" or "/A%2FB"? build() explicitly talks about '/' while
>> buildFromEncoded() does not. FYI, this also pertains from
>> buildFromEncodedMap.
>>
>
> IMHO, it is "/A/B" by default, and if one wants "/A%2FB" then it should be "/A%2FB", otherwise there's no way to get '/' kept not encoded with buildFromEncoded

Agreed. The result should be "/A/B". Encoded means the value has already been encoded and should not be encoded again.

Marek
>
>
> Cheers, Sergey