Resolution: Won't Do
I've been using UriBuilder to build redirect URIs inside a web application.
Until now, I only builded simple query parameters, but today I wanted to build an URI inside a queryParam.
The URI to be used as query is builded like:
> UriBuilder toQuery = UriBuilder.fromPath("/come_again").queryParam("t", "1234");
The main URI which will hold this one is builded:
> URI builded = UriBuilder.fromPath("/some").queryParam("next", toQuery.build().toASCIIString()).build();
I've tryied other ways (with build template arguments too, and using buildFromEncoded) but none of them produced the expected URI.
Expected should be:
But the result is:
All parameters get encoded, except the question mark.
I've attach a JUnit test class.
The main problem (which I found debugging) is with 'org.jboss.resteasy.util.Encode.queryNameValueEncoding', which considers as not encodeable char the question mark. But I think, that it should be encoded inside a query, if I understand correctly an URI format....
I'm building incorrectly this URI?
Is a JAX-RS spec problem?
Should file a RESTEasy bug?