Hello,

I can reproduce the issue, a HEAD method is being used, not GET. So sending a 
HEAD method to our application using an AsyncResponseConsumer hangs forever 
after calling the 'consumeResponse' method (but sending the same request using 
GET works).
In our code the only difference between head and get method is this:
AsyncRequestBuilder rb = this.request.isGetMethod() ? 
AsyncRequestBuilder.get(uri) : AsyncRequestBuilder.head(uri);

Rest of code is identical for both methods. Do I need to add some additional 
code to our AsyncResponseConsumer to manage HEAD methods? Since they don't have 
entity, 'consume' and 'streamEnd' are not called. What should I do to finish 
reading the head response and terminate the thread?

Thanks,
Joan.


-----Original Message-----
From: Joan grupoventus <joan.balagu...@grupoventus.com> 
Sent: Wednesday, May 8, 2019 7:24 PM
To: 'HttpClient User Discussion' <httpclient-users@hc.apache.org>
Subject: AsyncResponseConsumer thread stucked

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?

  

Thanks,

  

Joan.

  

  

  

  

  



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

Reply via email to