garydgregory commented on pull request #279:
URL:
https://github.com/apache/httpcomponents-core/pull/279#issuecomment-814078337
> HttpHost:
>
> * `#create(String)` is missing `URI#getHost()` handling for IPv6
> * `#toURI()` and `toHostString()` are incomplete in IPv6 regard
> * `#create(String)` operates on URI strings, but does not document that.
Percent-encoded input is completely ignored (off topic)
>
> Host:
>
> * `#toString()` is incomplete in IPv6 regard
> * I don't understand why a `URISyntaxException` is thrown although no URI
is parsed (off topic)
>
> URIAuthority:
>
> * Formatting suffers from the same issues as the other classes
>
> From my PoV the entire parsing logic is broken because it tries to read
the port before host/IP literal. Such an approach does not handle corner cases
like: `HttpHost.create("[::]")`
> You have to apply linear parsing here.
>
> Slighly off topic: I am quite surprised (shocked) that we have three
classes that basically do the same host/port parsing + stuff on top.
Maintaining the same code path three times doesn't make any sense. I do not
really understand why neither `URIAuthority` nor `HttpHost` are backed by Host.
>
> Before putting anymore effort into this I would consider my off topic
comment.
From the peanut gallery:
I would be nice to have HC be the canonical code for URI parsing and
generation. I would expect all that to take place in one location, at least
under the covers.
--
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]