hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject Re: My HostConfiguration (including a customized SocketFactory) gets replaced with a default one
Date Fri, 20 Jan 2006 20:28:17 GMT
Hi Alex,

> I'm trying to execute a GET request to an SSL socket, and I'm calling
> HttpClient.executeMethod() with a HostConfiguration argument.  Before
> line 387, my hostconfig.getProtocol().getSocketFactory() points to my
> socket factory, which points to an important overridden TrustManager. 
> But for some reason, at line 387, the Host inside the HostConfig gets
> reset, replacing the version that has my socket factory.

Please use Protocol.registerProtocol() to register your (secure) protocol
socket factory for a specific protocol:
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/protocol/Protocol.html#registerProtocol(java.lang.String,%20org.apache.commons.httpclient.protocol.Protocol)

hope that helps,
  Roland

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


Mime
View raw message