Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-208

'=' in String QueryParam not being encoded

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 1.1.RC1
    • 1.0.2.GA
    • jaxrs

    Description

      I'm trying to pass an SQL query as a query parameter:

      "select p from VirtualMachineEntity p where guest.guestId = :id"

      Method signature is:

      @POST
      @Path("/compile")
      public Query compile( @QueryParam("query") String queryText );

      Class is annotated with

      @Produces("application/xml")
      @Consumes("application/xml")

      In org.jboss.resteasy.util.Encode#encodeQueryString and org.jboss.resteasy.util.Encode#encodeSegment, look like the arguments in some of the calls to String#replace are backwards.

      For instance,

      URLEncoder.encode(segment, "UTF-8").replace("+", "%20").replace("%3B", ";").replace("%3D", "=").replace("%25", "%");

      Should that be:

      URLEncoder.encode(segment, "UTF-8").replace("+", "%20").replace(";","%3B").replace("=","%3D").replace("%","%25");

      ?

      Thanks!

      Attachments

        Activity

          People

            patriot1burke@gmail.com Bill Burke (Inactive)
            bmcfeely Brian McFeely (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: