Hi, We crossed our emails. I will take a look at the ' AbstractAsyncResponseConsumer'.
Thanks, Joan. -----Original Message----- From: Oleg Kalnichevski <ol...@apache.org> Sent: Thursday, May 9, 2019 12:42 PM To: HttpClient User Discussion <httpclient-users@hc.apache.org> Subject: Re: AsyncResponseConsumer thread stucked On Wed, 2019-05-08 at 19:24 +0200, Joan grupoventus wrote: > Hello, > > > > We are having the following issue. Before going deeper (traces, etc) > we would like to explain what we are seeing: > > > > HttpClient5 beta4 and HttpCore beta7 using an AsyncResponseConsumer. > > Requesting, via GET method, an image to an api: > http://192.168.6.131:80/simbolos/nevera.gif > > AsyncResponseConsumer consumeResponse method called correctly, and > getting a null EntityDetails > > At this point the thread gets stucked, streamEnd and failed methods > are never called, and the thread is released when the container > asynchronous timeout is reached. > > > > With the asynClient 4.1.3 this works, the > HttpAsyncResponseConsumer.responseReceived and responseCompleted > methods are called and the application reports a response with > content-length = 0. > > > > Must anything special be done when an > AsyncResponseConsumer.consumeResponse method receives a null > EntityDetails? > No, there must not. However in case of null entity methods #updateCapacity, #consume and #streamEnd will never fire as there is no data stream associated with the response message. Take a look at AbstractAsyncResponseConsumer as an example of response message processing, including those without an enclosed entity. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org