Thanks a lot, it solved my issue !I've already tried to create a new 
ProtocolSocketFactory, but I did not knew anything about 
Protocol.registerProtocol() method :(Thanks,Seb> Date: Mon, 3 Mar 2008 17:38:51 
+0100> From: [EMAIL PROTECTED]> To: [email protected]> Subject: 
Re: Problem with httpclient 3-x and socks server> > Hi Sebastien, Alan,> > Alan 
Moss wrote:> > You need to create your own custom ProtocolSocketFactory[1] and 
> > implement the createSocket methods in the manner you mentioned. Once you > 
> do that, you need to tell HttpClient to use it. Something like this:> > > >   
  if (shouldUseSocks) {> >         Protocol.registerProtocol("http",> >         
    new Protocol("http", new MyProtocolScoketFactory(), 80));> >     }> > 
That's the idea, although I would move the if(...) part into the> socket 
factory. Things get ugly if you want to juggle between> different socket 
factories for the same protocol/scheme.> > Alternatively, if you're on Java 5 
or later, you might want to> install your own ProxySelector in the "legacy" 
java.net API :-)> > 
http://java.sun.com/j2se/1.5.0/docs/api/java/net/ProxySelector.html#setDefault(java.net.ProxySelector)>
 http://java.sun.com/j2se/1.5.0/docs/guide/net/proxies.html> > > cheers,>    
Roland> > > > > [1] > > 
http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/protocol/ProtocolSocketFactory.html
 > > > > > > Good luck.> > > > -Alan> > > > 
---------------------------------------------------------------------> > To 
unsubscribe, e-mail: [EMAIL PROTECTED]> > For additional commands, e-mail: 
[EMAIL PROTECTED]> > > > > 
---------------------------------------------------------------------> To 
unsubscribe, e-mail: [EMAIL PROTECTED]> For additional commands, e-mail: [EMAIL 
PROTECTED]> 
_________________________________________________________________
Microsoft vous recommande de mettre à jour Internet Explorer.
http://specials.fr.msn.com/IE7P25
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to