hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: The best strategy to handle send aborts by remote server
Date Wed, 22 Sep 2010 15:24:22 GMT
On Wed, 2010-09-22 at 02:08 +0530, Asankha C. Perera wrote:
> I was able to overcome this by using the "Expect" header. I believe that 
> is the best way, if we are dealing with a Windows server?
> 

Asankha,

The 'expect-continue' handshake was designed primarily to avoid
situations like that. However, I think we should fix the issue with
AsyncNHttpClientHandler. At the very least it should not throw a NPE.
Could you please raise a JIRA for this defect?

By the way, if you are working with the asynchronous client side
protocol handers, we might as well invest some time into brining the
asynchronous version of HttpClient into a releasable shape. 

Cheers

Oleg  


> thanks
> asankha
> 
> On 09/21/2010 11:56 PM, Asankha C. Perera wrote:
> > Hi All
> >
> > When using HttpCore/NIO and sending a request, the remote party may 
> > pre-maturely send its response, before the send by the requesting 
> > client completes.
> >
> > When the AsyncNHttpClientHandler:processResponse() sees the response, 
> > it will close or reset the connection with a connState.resetOutput(); 
> > This causes the subsequent socket write attempt from outputReady()
> >
> > ProducingNHttpEntity entity = connState.getProducingEntity();
> >
> > to return null for the entity, causing a NPE.. What is the best way to 
> > handle this scenario?
> >
> > thanks
> > asankha
> >
> 
> 



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


Mime
View raw message