Thanks Oleg, this works.
I also needed to pass my custom HttpAsyncResponseConsumer to the FutureCallback
in order to extract the HttpResponse in the callback's "failure" method, and
ensure my HttpAsyncResponseConsumer maintains the HttpResponse even after its
"releaseResources" method is called
You need to fix your server.
HTTP is a stateless protocol, which is why cookies were invented in the
first place.
Once the client is notified by the server that authentication is required
by the 401 it has to send the auth info with every request. There is no
inherent state in HTTP.
When the serve
I’m using basic HTTP authentication in my application. I’ve configured it up,
and watching the debug logs, I can see the initial HTTP request, a 401 coming
back and HTTP Client then supplying the Authorization header. The server then
sends back a session cookie, and HTTP Client stores this away.
On Tue, 2016-12-06 at 11:21 -0500, Joseph Naegele wrote:
> Hi folks,
>
> How can I limit the amount of data downloaded for a request executed by the
> HttpAsyncClient and still process the response as "completed" in the
> registered FutureCallback? The use case is a large scale web crawler that