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

[jsr339-experts] Re: [jax-rs-spec users] Re: UriBuilder, forward slashes, path and segments

From: Bill Burke <bburke_at_redhat.com>
Date: Thu, 28 Jun 2012 10:35:49 -0400

On 6/28/12 10:34 AM, Marek Potociar wrote:
>
> On Jun 1, 2012, at 7:30 PM, Bill Burke wrote:
>
>> Well, I'm wrong, there is a workaround if you want to *not*
>> automatically encode '/', but its unclear which one would give the
>> desired behavior:
>>
>> build() v.s buildFromEncoded()
>>
>>
>> buildFromEncoded should probably only encode illegal characters and
>> '%', if not followed by two hexadecimal numbers and not '/'.
>
> yes.
>
> FWIW, the actual fix for the issue is the new set of methods being added
> to the UriBuilder API as discussed earlier:
>
> build(Object[] values, boolean encodeSlashInPath)
> buildFromMap(Map<String, ?> values, boolean encodeSlashInPath)
>

So the old buildFromEncoded() is supposed to automatically encodes the
'/' even though it is a legal character?

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com