users@jersey.java.net

Re: [Jersey] UriBuilder.segments() with semicolon

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 22 Jul 2009 13:22:07 +0200

On Jul 22, 2009, at 1:20 PM, Trygve Laugstøl wrote:

> Paul Sandoz wrote:
>> On Jul 22, 2009, at 5:47 AM, Igor Minar wrote:
>>> semicolon is a valid path (segment) separator (just like '/'), so
>>> I assume that's why it is not being encoded.
>>>
>> I think this is an issue. The following:
>> URI u = UriBuilder.fromPath("/a/
>> b").segment("x;y").matrixParam("e;f", "g;h").build();
>> System.out.println(u);
>> outputs:
>> /a/b/x;y;e;f=g;h
>> I think segment should percent encode ";" as should be the case for
>> matrix parameter names/values.
>> One can use the path method when ";" is not meant to be percent
>> encoded.
>
> Yeah, that's what I read from the docs too. So should I file a bug?
>

Yes please, thanks,
Paul.