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: Interceptor && ioReactor thread terminated abnormally
Date Thu, 06 May 2010 20:26:01 GMT
On Thu, 2010-05-06 at 17:08 +0200, Leo Galambos wrote:
> Hello,
> 
> I cannot decide who is responsible for an exception in the following
> example -- me or http-core? Should I always handle the
> "getEntity()==null" case in interceptors?
> 
> BTW: ResponseGzipUncompress does not check the case as well
> http://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.0.1/contrib/src/main/java/org/apache/http/contrib/compress/ResponseGzipUncompress.java
> 
> Thank you,
> LG
> 

Leo,

HTTP response messages that do not enclose an entity are rare but
perfectly valid. So, one should always check whether HttpEntity is null
or not. 

Protocol interceptors in the contrib package are meant as reference
material only and are sometimes oversimplified for brevity. But you are
absolutely right, ResponseGzipUncompress not checking HTTP entity for
being non null is wrong.

Does this answer your question?

Oleg


---------------------------------------------------------------------
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