Am 2020-05-27 um 14:47 schrieb Oleg Kalnichevski:
On Wed, 2020-05-27 at 14:32 +0200, Oleg Kalnichevski wrote:



...


https://github.com/apache/httpcomponents-client/commit/a554aadabafe26ae5412b26a311ffa105e623cc2

Tried with various timeouts, 5 ms, 15 ms, 25 ms, 50 ms, 500 ms.
Connections are correctly closed when:
* early response is received
* early response did not arrive in time and the server reached its
swallow limit (worked already)

I ran multiple requests in a loop as well as a subsequent one with
authentication header.

I am happily accepting this patch!


Great, but I still do not quite like the patch, though

1. There can be extra latency for normal request / response exchanges
due to the early response check.

2. The early response check is performed once and never retried. An
out
of sequence response can still be sent as a later point.

I working on a better fix. Please bear with me.


Micheal

Could you please try out this patch?

https://github.com/ok2c/httpcomponents-core/commit/732a99563e73529e0359625fda54351b843b2e34

This patch does not work (reliably):

* I have never seen EarlyResponseException
* When run over HTTPS I see early responses somtimes, sometimes I get SSLException
* Via HTTP I never see an early response, but only SocketException

Buffers again? Note that curl reads the physical response in any case.

See output here: http://home.apache.org/~michaelo/issues/early-response/try-1/

Michael

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