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

Encoded forward slashes are not preserved when rewriting URI

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.5.7
    • Fix Version/s: 4.5.8, 5.0 Beta4
    • Component/s: None
    • Labels:
      None
    • Flags:
      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

              • Assignee:
                Unassigned
                Reporter:
                jaymode Jay Modi
              • Votes:
                3 Vote for this issue
                Watchers:
                21 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