hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ossf...@dubioso.net>
Subject [HttpCore] case sensitivity in HttpHost
Date Sat, 21 Jul 2007 11:17:23 GMT
Hi all,

the hostname in HttpHost is case sensitive. When using core
directly, that's not much of a problem. But HttpRoute inherits
this case sensitivity: two routes are different if the target
hostname or proxy hostname differ only in case. Since our most
important connection manager depends on routes to implement
connection re-use and to enforce connections-per-host limits,
this opens a big hole.
One way to deal with this would be to normalize the hostname
when computing a route to the host. But then
is false, which may lead to other problems in the application.
At least some normalization would have to be implemented by
the application itself.

The alternative I'd like to implement is the following:
- in HttpHost, store a lowercase hostname in addition to
  the mixed-case one
- in HttpHost.equals and .hashCode, use the lowercase one

What do you think?


To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org

View raw message