users@jsr311.java.net

Re: UriBuilder.path("/")

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Tue, 24 Feb 2009 10:30:26 -0500

On Feb 24, 2009, at 9:41 AM, Sergey Beryozkin wrote:
>
> I'd just like to clarify what should happen in cases like
>
> UriBuilder.fromUri("http://foo/").build()
> or
> uriBuilder.path("/").build()
>
> The reason I ask is that if a UriBuilder implementations depends
> internally on PathSegment(s) then the last '/' is lost given that a
> PathSegment.getPath() for "/" returns an empty value.
>
> Is it correct to assume that irrespectively of UriBuilder
> implementation details a trailing '/', if any, must be preserved ?
> I reckon it has to be preserved
>
Yes, it has to be preserved.

Marc.

---
Marc Hadley <marc.hadley at sun.com>
Sun Microsystems.