hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: HttpClient performance
Date Tue, 21 Apr 2009 12:37:36 GMT
On Tue, Apr 21, 2009 at 05:26:06AM -0700, HockeyDave wrote:
> 
> I wouldn't want to.  I'm not pointing out that anything is wrong with
> HttpCore.  I'm just pointing out that your test case has a problem in its
> code.
> 

I am not sure I understand what test case you are referring to.

> This test case code will throw a nullpointerexception when you fail to
> receive a response so maybe you'll want to protect your test case by
> checking to ensure that you actually got a response before you call
> connStrategy.keepAlive(response, context).
> 
> i.e. if you don't get a response, there obviously won't be any headers in
> the response to tell you to keep-alive or not.

HttpRequestExector will never return a null HttpResponse object. If there is any problem of
any sort, either IOException or HttpException will be thrown.

Oleg


> 
> I think that the proper course would be to optimistically keep it alive.
> -- 
> View this message in context: http://www.nabble.com/HttpClient-performance-tp22838346p23154949.html
> Sent from the HttpClient-User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 

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


Mime
View raw message