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

Encoded forward slashes are not preserved when rewriting URI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.5.7
    • 4.5.8, 5.0 Beta4
    • None
    • None
    • Patch

    Description

      URIs that contain an encoded forward slash (%2F) are no longer preserved when the HTTP client executes. I came across this when upgrading from 4.5.2 to 4.5.7 and my requests that contained an encoded forward slash suddenly started failing. The appears to be due to decoding and re-encoding of the path that takes place in the URIUtils#rewriteURI method. I've attached a patch that restores the old behavior but if a URI contains two slashes in a row in addition to an encoded slash the encoded forward slash will be decoded.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jaymode Jay Modi
              Votes:
              3 Vote for this issue
              Watchers:
              22 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3.5h
                  3.5h