Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jaxrs-dev] Spec clarification: UriBuilder

Hi Markus

Thanks for the follow up, I appreciate it. Sounds like what I'm trying to achieve falls outside of the intended use of the URI builder and therefore wouldn't be guaranteed one way or the other by the spec. I suspect the "right" thing to do is look at whether using UriBuilder is right for this specific case (and use an alternative) given that it potentially isn't portable.

Thanks
Jon

On Fri, Jan 24, 2020 at 4:53 PM Markus KARG <markus@xxxxxxxxxxxxxxx> wrote:

Well, UriBuilder is defined by JAX-RS, and JAX-RS is an API for REST-over-http only, so I doubt there will be a cross-product solution be defined by us as long as you want to use any other scheme than "http". ;-)

-Markus

 

Von: jaxrs-dev-bounces@xxxxxxxxxxx [mailto:jaxrs-dev-bounces@xxxxxxxxxxx] Im Auftrag von Jonathan Gallimore
Gesendet: Freitag, 24. Januar 2020 11:53
An: jaxrs-dev@xxxxxxxxxxx
Betreff: [jaxrs-dev] Spec clarification: UriBuilder

 

Hi

 

Hopefully this isn't daft question, but I'd appreciate some help. I have a scenario where UriBuilder is being used to construct a file URI, and append a path to it:

 

UriBuilder.fromUri("file:///~/calendar").path("extra").build().toString()

 

I've tried this with a couple of implementations, specifically Jersey and CXF, with differing results - Jersey returns file:///~/calendar/extra, which is what I personally would expect. CXF on the other hand picks up "///~/calendar" as a "schemeSpecificPart" of the URI, and used that, and does not append the path.

 

I'm looking at https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/jaxrs/api/rs/core/uribuilder/JAXRSClient.java - its possible I've missed something, but I can't see a case that specifically covers file://, or a case that specifically covers UriBuilder.fromUri().path() (there are others that test cases such as fromUri().port(), fromUri().host() and fromUri().scheme() etc).

 

Could you clarify what behaviour you'd expect in this scenario, and / or point me at the relevant part of the spec document (I'm struggling to find a reference there too).

 

I'd be very happy to contribute any appropriate updates to either documentation or TCK tests if necessary.

 

Many thanks

 

Jon

 

--

Jonathan Gallimore

_______________________________________________
jaxrs-dev mailing list
jaxrs-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jaxrs-dev


--
Jonathan Gallimore

Back to the top