]> git.ipfire.org Git - thirdparty/squid.git/commit - src/http/StateFlags.h
Do not send keep-alive or close in HTTP Upgrade requests (#732)
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 27 Oct 2020 23:33:39 +0000 (23:33 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 28 Oct 2020 10:34:03 +0000 (10:34 +0000)
commit1f482f82a6345a13e9211d5b3601f15aedf822ae
tree915bc7495b6625bca15888a1c9f575587afa86fa
parent5d84beb598998a38d42075f33a1d0b3ae64f759e
Do not send keep-alive or close in HTTP Upgrade requests (#732)

A presence of a Connection:keep-alive or Connection:close header in an
Upgrade request sent by Squid breaks some Google Voice services. FWIW,
these headers are not present in RFC 7230 Upgrade example, and popular
client requests do not send them.

* In most cases, Squid was sending Connection:keep-alive which is
  redundant in Upgrade requests (because they are HTTP/1.1).

* In rare cases (e.g., server_persistent_connections=off), Squid was
  sending Connection:close. Since we cannot send that header and remain
  compatible with popular Upgrade-dependent services, we now do not send
  it but treat the connection as non-persistent if the server does not
  upgrade and expects us to continue reusing the connection.
src/http.cc
src/http/StateFlags.h