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

Wrong encoding of matrix parameter

    Details

      Description

      Special characters in matrix parameter like slash "/" are not encoded.
      Thus the slash interpreted as the beginning of a new segment.

      UriBuilderImpl uriBuilder = new UriBuilderImpl();
      uriBuilder.matrixParam("matrixParam", "12/3");
      uriBuilder.build();

      The resulting matrix parameter is "12/3" and not "12%2F" as expected.

      Possible Bugfix: initialize matrixParameterEncoding from pathSegmentEncoding so that "/" is added to the list of characters to encode.
      static

      { ... System.arraycopy(pathSegmentEncoding, 0, matrixParameterEncoding, 0, pathEncoding.length); matrixParameterEncoding[';'] = "%3B"; matrixParameterEncoding['='] = "%3D"; ... }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ron_sigal Ronald Sigal
                Reporter:
                pcaspary Peter Caspary
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: