Hello,

Can younspecify why you need to delay it? Do wou want to make some kind of rate 
limit with this or optimize pipelining?

Gruss
Bernd
-- 
http://bernd.eckenfels.net
>From Win 10 Mobile

Von: Pellerin, Clement
Gesendet: Montag, 17. Oktober 2016 23:23
An: httpclient-users@hc.apache.org
Betreff: Controlling releaseConnection

We are using HttpClient 4.5.2

Our customer needs to delay the release of the connection until the response is 
fully processed.
They want to turn off the early automatic release of the connection and do it 
manually later.

This is the problematic code in MainClientExec
            // check for entity, release connection if possible
            final HttpEntity entity = response.getEntity();
            if (entity == null || !entity.isStreaming()) {
                // connection not needed and (assumed to be) in re-usable state
                connHolder.releaseConnection();
                return new HttpResponseProxy(response, null);
            } else {
                return new HttpResponseProxy(response, connHolder);
            }

Can you suggest an approach to do this without duplicating all of 
MainClientExec.execute()?
What acceptable changes can we make to the HttpClient source code to make this 
easier?
I am willing to implement the change if there is interest.



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