nitya vyas wrote:
> The problem I find now is that this createSocket method does not get called
> from the HTTPConnection class... the reason being this line of code.....(i
> dont wanna change the HTTPConnection if theres another way.. )
>
> final ProtocolSocketFactory socketFactory = (isSecure() && isProxied()? new
> DefaultProtocolSocketFactory() : protocolInUse.getSocketFactory());
>
What version of HttpClient are you using?
This is what I find in the current code (3.1 final):
if (isSecure() && isProxied()) {
Protocol defaultprotocol = Protocol.getProtocol("http");
socketFactory = defaultprotocol.getSocketFactory();
} else {
socketFactory = this.protocolInUse.getSocketFactory();
}
So you can simply register your own protocol "http"
that calls an instance of your socket factory.
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]