users@jax-rs-spec.java.net

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

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Sun, 10 Mar 2013 18:06:02 +0000

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


Cheers, Sergey