-
Bug
-
Resolution: Done
-
Critical
-
None
-
None
-
None
The change made in RESTEASY-2845 breaks clients that have a method with more than 1 path param in the template as they will ALWAYS be encoded (i.e. / will be replaced) - even if you do not want it.
Here is an example trait that has 2 path params and it worked fine until recent upgrade. It seems that as of this PR it will always encode '/' in id path param:
@Path("something") @Consumes(Array(MediaType.APPLICATION_JSON)) @Produces(Array(MediaType.APPLICATION_JSON)) trait Resource { @POST @Path("{id:.+}/commands/{commandId:.+}/confirm") def confirmCommand(@PathParam("id") id: String, @PathParam("commandId") commandId: String): Response }
There is also @Encoded and PathParamProcessor but it looks like they have no impact after the following change was done as part of this ticket:
// in org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker#createRequest: if (pathParamsMap.size() > 1) { target = target.resolveTemplates(pathParamsMap); }
why is > 1 a special case here? If path param has to be encoded then condition should be > 0?
Other than that, how can one instruct it not to encode pathparam?
- is caused by
-
RESTEASY-2845 ResteasyWebTarget.proxy(Class) problem with questionmark in @Path with Regex
- Open