With the following query, the webserver abruptly closes the connection: (cat ; sleep 2) <<EOF | openssl s_client -connect download.samba.org:443 GET /pub/samba/ HTTP/1.1 TE: deflate, gzip;q=0.3 Connection: TE, close Host: download.samba.org User-Agent: Debian uscan EOF This one works: (cat ; sleep 2) <<EOF | openssl s_client -connect download.samba.org:443 GET /pub/samba/ HTTP/1.1 Host: download.samba.org User-Agent: Debian uscan EOF The reason is probably related to HTTP/2 were the "TE" header is forbidden unless set to "traillers". Refs: - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/TE - https://tools.ietf.org/html/rfc7540#section-8.1.2.2 What is the webserver used? If there is a reverse-proxy, it should probably drop TE headers unconditionally. On Apache: RequestHeader unset TE On nginx: proxy_set_header TE ""; Refs: - http://httpd.apache.org/docs/2.4/mod/mod_headers.html#requestheader - https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_set_header
Thanks for the good report! I reported this upstream for haproxy (https://github.com/haproxy/haproxy/issues/464) and added workaround for now here.