Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-679

URIBuilder in 5.1 encodes more characters than necessary

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Invalid
    • 5.1
    • None
    • HttpCore
    • None

    Description

      Take this simple code example:

      System.out.println(new URIBuilder().setScheme("https").setHost("example.com").setPathSegments("foo:bar").toString());
      

      In 5.0 and in 4.x, this code would produce 

      https://example.com/foo:bar
      

      Since 5.1, the behavior has changed. It now produces

      https://example.com/foo%3Abar
      

      This actually broke one of my calls to iap.googleapis.com. I know it can be argued that it's the server's fault for not decoding %3A, but ':' does not actually need to be encoded in URL path segments. Also, this is an unnecessary breaking change in URIBuilder's behavior.

      Attachments

        Activity

          People

            Unassigned Unassigned
            slisaasquatch Siqi Li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: