On Wed, 2020-05-27 at 22:14 +0200, Oleg Kalnichevski wrote:
> On Wed, 2020-05-27 at 21:10 +0200, Michael Osipov wrote:
> > Am 2020-05-27 um 19:13 schrieb Oleg Kalnichevski:
> > > On Wed, 2020-05-27 at 18:26 +0200, Michael Osipov wrote:
> > > > 
> > > 
> > > ...
> > > 
> > > 
> > > 
> > > 
> 
> 
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/
> > > > 
> > > 
> > > I do not want to give up yet. Could you please try out this
> > > patch?
> > > 
> > > 
> 
> 
https://github.com/ok2c/httpcomponents-core/commit/8d7b2e3d38b4d696d45cde16c52dba278be15438
> > 
> > Apologies, I made a mistake, since take 1 was 5.1-SNAPSHOT, I
> > assumed 
> > that take2 has this version too, noticed too late that it is 
> > 5.0.1-SNAPSHOT actually.
> > 
> > I have redone the tests, and raised to 50 iterations. Write buffer
> > in 
> > HttpEntity is 16 KiB.
> > 
> > 732a99563e73529e0359625fda54351b843b2e34:
> > * Performs great on HTTP, fails really early
> > * Does not work with TLS 1.3 at all
> > 
> > 8d7b2e3d38b4d696d45cde16c52dba278be15438:
> > * Works with HTTP, but takes a lot of payload to detect early
> > response
> > * HTTPS is a bit better, it takes around 400 kB.
> > 
> > Output is here: 
> > http://home.apache.org/~michaelo/issues/early-response/try-2/
> > 
> > Michael
> 
> I do not think it really matters if it is 0 kb or 400 kb as long as
> the
> server does not reset the connection and the request gets correctly
> retried. 
> 
> I will improve the patch further. Please bear with me.
> 

Please try out this patch. This should now give us proper out of
sequence response check with minimal overhead. The check will now be
performed for chunks of 2048 bytes instead of each and every write
operations.

https://github.com/ok2c/httpcomponents-core/commit/7baa51f873da759d4e81973d4ca0a16f4199c51b

Oleg


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