Jovan Attisha created HTTPCORE-709:
--------------------------------------

             Summary: BasicHttpRequest throws IllegalArgumentException for path 
starting with multiple slashes with authority
                 Key: HTTPCORE-709
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-709
             Project: HttpComponents HttpCore
          Issue Type: Bug
          Components: HttpCore
    Affects Versions: 5.2-alpha2, 5.2-alpha1, 5.1, 5.1.3, 5.1.2, 5.1.1, 5.0.1
            Reporter: Jovan Attisha


[This 
commit|https://github.com/apache/httpcomponents-core/commit/1614d5d5a5de6f4faadff9ecb566982d56b65179]
 to BasicHttpRequest attempts to make BasicHttpRequest conform to RFC3986, but 
I actually don't think this is properly following spec. [The 
RFC|https://datatracker.ietf.org/doc/html/rfc3986#section-3.3] 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:
{code:java}
new BasicHttpRequest("GET", new URI("https://google.com//";));{code}
throws an IllegalArgumentException.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to