hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From VJ <vjkumar.bor...@gmail.com>
Subject Re: HTTPClient SOCKS proxy setup, DNS name is not resolved - UnknownHostException
Date Sat, 07 Jan 2012 15:01:29 GMT
Further investigation on this reveals following results on the same test
bed:
1. httpclient 4.0.1 SSLPeerUnverifiedException
2. httpclient 4.0.2 UnknownHostException
                          When entry is added to /etc/hosts file, results
in Certificate validation exception due to host name mismatch IP !=
hostname from certificate
3. httpclient 4.0.3  UnknownHostException
                           When entry is added to /etc/hosts, works fine.
4. httpclient 4.1.2  UnknownHostException
                           When entry is added to /etc/hosts, works fine.

I tried finding the difference between 4.0.1 -> 4.0.2, looks like changes
to org.apache.http.impl.conn.DefaultClientConnectionOperator in method
openConnection causing the exception change from SSLUnverifiedException to
UnknownHostException. The call to
"InetAddress.getAllByName(target.getHostName());" does not resolve the IP.
But when it was not used in 4.0.1, somehow it was resolving the hostname to
IP and failing to validate the server certificate. Is that so?


Regards
VJ

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message