users@jersey.java.net

Re: [Jersey] UriInfo mishandling port numbers

From: Gili <cowwoc_at_bbs.darktech.org>
Date: Mon, 17 Nov 2008 08:55:25 -0800 (PST)

That was it! Damnit!!! I wasted so many hours on this issue :)

Thanks,
Gili


Paul Sandoz wrote:
>
>
> On Nov 17, 2008, at 5:14 PM, Gili wrote:
>
>>
>> According to Netbeans, I am using Jersey 1.0 -- but remember
>> http://www.netbeans.org/issues/show_bug.cgi?id=122930
>>
>
> Did you create a JAX-RS-based project in an older version of NetBeans
> then upgrade to a later version of NetBeans? I seem to recall that was
> an issue for one developer in the the older pre 1.0 jersey jars were
> being used. But when a new project was created it was different.
>
>
>> I will download 1.0 myself off your website and try reproducing the
>> problem
>> just to be sure.
>>
>
> OK.
>
> Paul.
>
>> Gili
>>
>>
>> Paul Sandoz wrote:
>>>
>>>
>>> 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
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/UriInfo-mishandling-port-numbers-tp1508438p1510075.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
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
>

-- 
View this message in context: http://n2.nabble.com/UriInfo-mishandling-port-numbers-tp1508438p1510269.html
Sent from the Jersey mailing list archive at Nabble.com.