Hi Oleg,

I am setting socket timeout at 'get' method level parameters
(method.getParams().setSoTimeout(TIMEOUT)). When I try to connect to a
host with 'https' protocol, during the SSL session establishment, server
is sending certificate request. 
If user does not respond to the security certificate alert dialog (by
clicking on Yes or No etc.), then execute method waits there forever. I
am expecting socket to timeout under this condition. Please let me know
how to get around this problem. I would like to have a timeout at method
level if user does not respond to the certificate request.

Thanks,
- vasantha


-----Original Message-----
From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 15, 2006 3:33 PM
To: HttpClient User Discussion
Cc: Vasantha Tammana (vtammana)
Subject: RE: Setting Httpclient Timeout

On Tue, 2006-08-15 at 15:18 -0700, Vasantha Tammana (vtammana) wrote:
> Thanks Oleg for your response. I will change my connection timeout to 
> socket timeout.
> Can you please tell me the difference between these two timeouts?
> 

See
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/
httpclient/params/HttpConnectionParams.html#CONNECTION_TIMEOUT
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/
httpclient/params/HttpConnectionParams.html#SO_TIMEOUT

> Coming to the precedence, if I don't set socket timeout on method (i.e

> leave the defaults), but let's say I set it host level, will that make

> sure it timesout?

It should. For details see
http://jakarta.apache.org/commons/httpclient/preference-api.html

Oleg

> 
> Thanks,
> - vasantha
> 
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 15, 2006 3:10 PM
> To: HttpClient User Discussion
> Cc: Vasantha Tammana (vtammana)
> Subject: Re: Setting Httpclient Timeout
> 
> On Tue, 2006-08-15 at 14:56 -0700, Vasantha Tammana (vtammana) wrote:
> > Hi,
> >  
> > I have connection timeout set on HttpConnectionManager 
> > (MultiThreadedHttpConnectionManager.getParams().setConnectionTImeout
> > (x
> > )) . It seems to be not taking effect i.e it does not timeout at the

> > end of timeout time when there is no response.
> >  
> Vasantha,
> 
> I suspect you are confusing the socket timeout with the connect
timeout.
> Make sure that you set the socket timeout either at the connection 
> manager level, or at the host level, or at the method level
> 
> > I remember reading some mailing archives on HttpClient that the 
> > timeout on HostConfiguration takes precedence than the
> ConnentionManager etc.
> > Can somebody clarify the precedence on params settings with 
> > HostConfigurations, ConnectionManager, HttpClient and finally
> GetMethod?
> >  
> 
> The _socket_ timeout value, if set, takes precedence in the following
> order: method, host, connection manager, agent
> 
> > It is really confusing, because you can set the connection timeout 
> > in params at each layer.
> 
> This is not quite the case. The _connect_ timeout can be set either at

> the connection manager level or at the agent level
> 
> Hope this helps
> 
> Oleg
> 
> > 
> 
> >  
> > Any help is really appreciated.
> >  
> > 
> > Thanks,
> > - Vsantha
> >  
> > 
> > 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to