users@jersey.java.net

Re: [Jersey] UriInfo mishandling port numbers

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 17 Nov 2008 12:25:13 +0100

On Nov 17, 2008, at 8:50 AM, Gili wrote:

>
> Hi,
>
> There seems to be a bug in the implementation of UriInfo.path(Class
> resource, String method). Here is the output I see:
>
> URI baseUri = URI.create("http://example.com/v1/")
>
> UriBuilder.fromUri(baseUri).path(AdministratorsResource.class).build()
> returns "http://example.com/v1/administrators"
>
> UriBuilder
> .fromUri
> (baseUri
> ).path
> (AdministratorsResource.class).path(AdministratorsResource.class,
> "locateAdministrator").build(username) returns
> "http://example.com:-1/v1/administrators/username"
>
> Notice how port ":-1" was added. I am expecting Jersey to retain the
> default
> port. Should I file a bug report for this?
>

What version of Jersey are you using? It should be fixed in 1.0.

https://jersey.dev.java.net/issues/show_bug.cgi?id=114

I re-verified in 1.0.1-SNAPSHOT.

Paul.

> Gili
> --
> View this message in context: http://n2.nabble.com/UriInfo-mishandling-port-numbers-tp1508438p1508438.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>