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

Response.temporaryRedirect() cannot handle query parameter correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.10
    • 2.3, 2.2.11
    • JAX-RS
    • None

    Description

      Consider the following code that wants to redirect to a non-absolute URL containing query parameters:

      String cssLink1="http://yui.yahooapis.com/3.2.0/build/cssreset/reset-min.css"
      return Response.temporaryRedirect(UriBuilder.fromPath("whatever/redirection").queryParam("css1",cssLink1).build()).build();
      

      The created Location header of the response will contain the following value:
      http://myserver/app/services/public/whatever/redirection%3Fcss1=http:/yui.yahooapis.com/3.2.0/build/cssreset/reset-min.css

      IMHO this should be:
      http://myserver/app/services/public/whatever/redirection?css1=http:/yui.yahooapis.com/3.2.0/build/cssreset/reset-min.css

      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: