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

BasicHttpRequest throws IllegalArgumentException for path starting with multiple slashes with authority

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 5.0.1, 5.1.1, 5.1.2, 5.1.3, 5.1, 5.2-alpha1, 5.2-alpha2
    • None
    • HttpCore
    • None
    • Important

    Description

      This commit to BasicHttpRequest attempts to make BasicHttpRequest conform to RFC3986, but I actually don't think this is properly following spec. The RFC says that:
      If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character. If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//").
      However, the code blocks a double slash no matter what, even if there is an authority component. So calling:

      new BasicHttpRequest("GET", new URI("https://google.com//"));

      throws an IllegalArgumentException.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jattisha Jovan Attisha
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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