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

[jsr339-experts] Re: [jax-rs-spec users] Trailing slash in UriInfo.getBaseUri

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Fri, 13 Dec 2013 12:26:53 +0000

On 13/12/13 11:17, Marek Potociar wrote:
> In Jersey we return base URI that always ends with a trailing slash. UriBuilder should be able to deal with double "//" when concatenating IMO.
>
yes, that was my point too actually, see 438 issue for more info

I've opened this issue because we had a user pointing out to this
specific fact that Jersey returns at the end "/", possibly assuming it
was a requirement

Sergey



> Marek
>
> On 29 Nov 2013, at 11:44, Sergey Beryozkin <sberyozkin_at_talend.com> wrote:
>
>> Hi
>>
>> Is UriInfo.getBaseUri() expected to return a value with the trailing slash ?
>>
>> The documentation says the path values of root resources are relative to base URI. Users though typically work with UriBuilder when concatenating paths, so I'm not sure how important or not the trailimng slash might be.
>>
>> I've opened a minor (doc) improvement request:
>> https://java.net/jira/browse/JAX_RS_SPEC-438
>>
>> Thanks, Sergey
>