jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: UriBuilder.segment and build with encodePathSlash

From: Markus KARG <markus_at_headcrashing.eu>
Date: Mon, 22 Oct 2012 18:53:00 +0200

I thought that a spec lead has to provide a TCK that answers questions like
this by simple red or green bars. ;-)

> -----Original Message-----
> From: Sergey Beryozkin [mailto:sberyozkin_at_talend.com]
> Sent: Montag, 22. Oktober 2012 13:27
> To: jsr339-experts_at_jax-rs-spec.java.net
> Subject: [jsr339-experts] UriBuilder.segment and build with
> encodePathSlash
>
> I know that I'm the last one who still does not get it :-).
>
> Consider the following:
>
> uriBuilder.fromPath("http://localhost").segment("{a}").build("a/b",
> false);
>
> UriBuilder.segment() states that "/" have to be encoded.
> So one possible output is:
>
> "http://localhost/a%2Fb"
>
> While build() requires this slash to be left as is.
>
> So the result is then:
>
> "http://localhost/a/b"
>