Am 2018-12-24 um 01:05 schrieb Michael Osipov:
Am 2018-12-23 um 23:21 schrieb Oleg Kalnichevski:
On Sun, 2018-12-23 at 22:07 +0100, Michael Osipov wrote:
Folks,

why does a minimal client:
HttpClientBuilder bulder =
HttpClientBuilder.create().disableContentCompression();
CloseableHttpClient client = bulder.build();
CloseableHttpResponse resp = client.execute(new HttpGet("
https://google.de";));
EntityUtils.consumeQuietly(resp.getEntity());

still send the "Connection: keep-alive" request header? This seems
like
wasted bytes for HTTP/1.1. Is that really for backwards compat?
Aren't
we good to break (remove) this in 5.0?


It is mostly for the sake of compatibility. I am fine with dropping the
header for HTTP/1.1 connections, though I see no harm in keeping it.

Right, there is no harm, but also no benefit and just wasted bytes for HTTP/1.1. As far as I can see, it is RequestConnControl. I have created a branch (drop-http11-keep-alive) with a first shot of changes. I am not yet happy with the remaining test method names because they do not reflect the truth now. I am also not really happy with "Proxy-Connection" because RFC 7231 says in A.1.2: "As a result, clients are encouraged not to send the Proxy-Connection header field in any requests." Is that good reason to drop this "Proxy-Connection" fiddling in client and core altogether?

Alternatively, this entire class could check the HTTP version first, or it is removed from the default chain and the user has to add this if he wants to use HTTP/1.1?

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to