Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6122

JAX-RS proxy client with @QueryParam is not encoding the parameter value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.0.3, 2.7.14, 3.1
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      If I create a JAX-RS client with the proxy pattern outlined at http://cxf.apache.org/docs/jax-rs-client-api.html#JAX-RSClientAPI-Proxy-basedAPI and the proxy interface looks like this

      @PUT
      	@Path("/admin/user/{id}.json")
      	@Produces(value = { "application/json" })
      	public User updateUser(@PathParam("id") String userId, @QueryParam("country") String country, @QueryParam("description") String role, @QueryParam("telephone") String phone);
      

      all URL parameters are not correctly encoded.
      E.g. if phone contains a "+" this will not be converted to %2B or if the role contains an umlaut this will not be encoded either.

      Another related question is: Which character set will be used here (I guess UTF-8 makes sense) once that bug is fixed? Also how would it be possible to override the character set?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sergey_beryozkin Sergey Beryozkin
                Reporter:
                kwin Konrad Windszus
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: