From what I understand, a HTTP connection could either be keep-alive
or close
.
I sent a HTTP request to a server:
GET /page
You are using HTTP/1.1
and you are specifying Connection: keep-alive
.
Under HTTP/1.1
all connections are keep-alive by default, and the Connection: keep-alive
header has been deprecated, so you should not send it.
Connection: keep-alive
is a little hack used back in the so-called HTTP/1.0+
days. (The +
stands for "hacks necessary to get it to work.")
In HTTP: The Definitive Guide by Brian Totty, Marjorie Sayer, Sailu Reddy, Anshu Aggarwal, David Gourley by O'Reilly we read:
Keep-alive is deprecated and no longer documented in the current HTTP/1.1 specification. However, keep-alive handshaking is still in relatively common use by browsers and servers, so HTTP implementors should be prepared to interoperate with it.
The server might be "interoperating" and trolling you for being redundant.