carterkozak commented on pull request #279:
URL: 
https://github.com/apache/httpcomponents-core/pull/279#issuecomment-815282205


   >  I would just rely on URI#parse() until we have our own RFC 3986 compliant 
impl. At the end it will be used in a URI somehow.
   
   Hmm, I think this is easier said than done. Using `URI.create` gives us the 
following
   
   The current parsers would consider `foo` a hostname as path isn't relevant:
   ```
   input: 'foo'
    scheme null
      path null
      host null
      port -1
      path foo
   ```
   
   I don't know where the `80` (port) ends up in this case, but it's safe to 
say `foo` shouldn't be the scheme:
   ```
   input: 'foo:80'
    scheme foo
      user null
      host null
      port -1
      path null
     query null
   ```
   
   ```
   input 'user@foo:80'
   IllegalArgumentException: Illegal character in scheme name at index 4: 
user@foo:80
   ```
   
   I suppose we could add a stub scheme to inputs that don't already provide 
one, and parse from there, however I'd have to carefully consider the edge 
cases.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to