Watching the archive ( I see that my message is not seen, so I will send without format. Sorry for spam >.<


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",;
I've tryied other ways (with build template arguments too, and using buildFromEncoded) but none of them produced the expected URI.

Expected should be:
> /some?next=%2Fcome_again%3Ft%3D1234
But the result is:
> /some?next=%2Fcome_again?t%3D1234

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?