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

UriInfoImpl.getRequestUri() fails on URLs that require escaping

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.5, 2.2.6
    • 2.2.7
    • JAX-RS
    • None

    Description

      current implementation from UriInfoImpl:

          public URI getRequestUri() {
              String path = getAbsolutePathAsString();
              String queries = (String)message.get(Message.QUERY_STRING);
              if (queries != null) {
                  path += "?" + queries;
              }
              return URI.create(path);
          }
      

      This fails for URIs that have characters that have to be escaped as of rfc2396.

      Examples: http://localhost:13080/services/rest/crypto/hash;algorithm=S{A/text/foo or http://localhost:13080/services/rest/crypto/hash;algorithm=S^A/text/foo
      fail with Exception during getRequestUri() due to { or ^ as part of the uri

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            thecoolace Bla Bla
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: