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.

Oleg

> > [main] DEBUG
> > org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOpera
> > tor - Connection established 192.168.1.13:52724<->216.58.210.3:443
> > [main] DEBUG org.apache.hc.client5.http.impl.classic.MainClientExec
> > - Executing request GET / HTTP/1.1
> > [main] DEBUG org.apache.hc.client5.http.headers - http-outgoing-0
> > >> GET / HTTP/1.1
> > [main] DEBUG org.apache.hc.client5.http.headers - http-outgoing-0
> > >> Host: google.de
> > [main] DEBUG org.apache.hc.client5.http.headers - http-outgoing-0
> > >> Connection: keep-alive
> > [main] DEBUG org.apache.hc.client5.http.headers - http-outgoing-0
> > >> User-Agent: Apache-HttpClient/5.0-beta4-SNAPSHOT
> > (Java/1.7.0_191)
> 
> Michael
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


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

Reply via email to