users@jersey.java.net

Re: [Jersey] Double // in URL

From: Julian Reschke <julian.reschke_at_gmx.de>
Date: Mon, 29 Dec 2008 14:44:45 +0100

Daniel Manzke wrote:
> Hi,
>
> a short question.
>
> Are they equal? :) Does jersey threat them as equal?
>
> - http://localhost/filesystem//ECM%20Search/hitlist_suchseite_1.jpg
> - http://localhost/filesystem/ECM%20Search/hitlist_suchseite_1.jpg

Depends on the equality relation :-) With URIs there can be many.

In this case, one of the URIs contains an empty path segment. It depends
on the use case how to compare them.

In *practice* I don't see anybody using empty path segments on purpose,
thus I'd treat them as a client error (pasting together a URI), and
compare them as equal.

BR, Julian