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

UriBuilder.queryParam must not encode a plus sign

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.2.GA
    • 1.1.GA
    • None
    • None
    • Hide

      Replace "+" with "%20"

      Show
      Replace "+" with "%20"

      The UriBuilder spec says: Builder methods perform contextual encoding of characters not permitted in the corresponding URI component following the rules of the application/x-www-form-urlencoded media type for query parameters.

      Both "" and "%20" are permitted in query parameter values but RESTEasy 1.1.GA encodes "" and skips "%20".

      In fact, I don't see the value of contextual encoding for query parameters. In most cases I have parameter values containing any characters like "%", "+", or "{", so I always encode them manually before passing to UriBuilder.queryParam.

      An alternative way is to use templates when a build with RESTEASY-266 fixed is released, but this approach is also quite inconvenient when building URLs with many optional parameters.

              patriot1burke@gmail.com Bill Burke (Inactive)
              tarasp Taras Puchko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: