Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1209

remove dots form url when following a redirect

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.1.3
    • 4.2.1
    • HttpClient (classic)
    • None

    Description

      I'm writing a test client for my application. After a POST to the application a redirect is send containing "../" in the url.

      To follow the redirect I use the LaxRedirectStrategy. I also expected that the url is normalized and the "../" is removed (like browsers do). But this isn't the case.

      When the application redirects the client to: http://localhost/content/profile/../123456789 a get request to exactly that url is made resulting in a 404 at our application.

      I extended the LaxRedirectStrategy and added as work arround:
      URIUtils.resolve(super.getLocationURI(request, response, context), "")

      Attachments

        Activity

          People

            Unassigned Unassigned
            martin.orange11 Martin Tilma
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: